Skip to content

Commit 191b310

Browse files
committed
fixed typo and deleted old note
1 parent 7820396 commit 191b310

1 file changed

Lines changed: 29 additions & 17 deletions

File tree

chapter12.ipynb

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040
{
4141
"cell_type": "code",
4242
"execution_count": 3,
43-
"metadata": {},
43+
"metadata": {
44+
"collapsed": true
45+
},
4446
"outputs": [],
4547
"source": [
4648
"from collections import OrderedDict\n",
@@ -151,7 +153,9 @@
151153
{
152154
"cell_type": "code",
153155
"execution_count": 7,
154-
"metadata": {},
156+
"metadata": {
157+
"collapsed": true
158+
},
155159
"outputs": [],
156160
"source": [
157161
"restriction_cols = [\n",
@@ -191,7 +195,9 @@
191195
{
192196
"cell_type": "code",
193197
"execution_count": 9,
194-
"metadata": {},
198+
"metadata": {
199+
"collapsed": true
200+
},
195201
"outputs": [],
196202
"source": [
197203
"nhefs['constant'] = 1\n",
@@ -417,7 +423,7 @@
417423
"cell_type": "markdown",
418424
"metadata": {},
419425
"source": [
420-
"We're going to be modeling with sqaured terms and some categorical features. Here we'll explicitly add squared features and dummy features to the data. In later chapters we'll use Statsmodels' formula syntax."
426+
"We're going to be modeling with squared terms and some categorical features. Here we'll explicitly add squared features and dummy features to the data. In later chapters we'll use Statsmodels' formula syntax."
421427
]
422428
},
423429
{
@@ -430,7 +436,9 @@
430436
{
431437
"cell_type": "code",
432438
"execution_count": 14,
433-
"metadata": {},
439+
"metadata": {
440+
"collapsed": true
441+
},
434442
"outputs": [],
435443
"source": [
436444
"for col in ['age', 'wt71', 'smokeintensity', 'smokeyrs']:\n",
@@ -803,7 +811,9 @@
803811
{
804812
"cell_type": "code",
805813
"execution_count": 26,
806-
"metadata": {},
814+
"metadata": {
815+
"collapsed": true
816+
},
807817
"outputs": [],
808818
"source": [
809819
"crosstab = pd.crosstab(subset.age, subset.qsmk).sort_index()"
@@ -1146,7 +1156,9 @@
11461156
{
11471157
"cell_type": "code",
11481158
"execution_count": 35,
1149-
"metadata": {},
1159+
"metadata": {
1160+
"collapsed": true
1161+
},
11501162
"outputs": [],
11511163
"source": [
11521164
"s_weights = np.zeros(nhefs.shape[0])\n",
@@ -1464,7 +1476,9 @@
14641476
{
14651477
"cell_type": "code",
14661478
"execution_count": 45,
1467-
"metadata": {},
1479+
"metadata": {
1480+
"collapsed": true
1481+
},
14681482
"outputs": [],
14691483
"source": [
14701484
"fAL = scipy.stats.norm.pdf(\n",
@@ -1587,7 +1601,9 @@
15871601
{
15881602
"cell_type": "code",
15891603
"execution_count": 51,
1590-
"metadata": {},
1604+
"metadata": {
1605+
"collapsed": true
1606+
},
15911607
"outputs": [],
15921608
"source": [
15931609
"y = intensity25.wt82_71\n",
@@ -1656,13 +1672,6 @@
16561672
"\"if interested in the causal effect of quitting smoking A (1: yes, 0: no) on the risk of death D (1: yes, 0: no) by 1992, one could consider a _marginal structural logistic model_\""
16571673
]
16581674
},
1659-
{
1660-
"cell_type": "markdown",
1661-
"metadata": {},
1662-
"source": [
1663-
"Note: the numbers below don't match"
1664-
]
1665-
},
16661675
{
16671676
"cell_type": "code",
16681677
"execution_count": 53,
@@ -2277,7 +2286,9 @@
22772286
{
22782287
"cell_type": "code",
22792288
"execution_count": 77,
2280-
"metadata": {},
2289+
"metadata": {
2290+
"collapsed": true
2291+
},
22812292
"outputs": [],
22822293
"source": [
22832294
"wls = sm.WLS(\n",
@@ -2323,6 +2334,7 @@
23232334
}
23242335
],
23252336
"metadata": {
2337+
"anaconda-cloud": {},
23262338
"kernelspec": {
23272339
"display_name": "Python 3",
23282340
"language": "python",

0 commit comments

Comments
 (0)