Skip to content

Commit b5007d8

Browse files
committed
Fixed rough work
1 parent 43a0e7f commit b5007d8

File tree

1 file changed

+162
-170
lines changed

1 file changed

+162
-170
lines changed

associations.org

Lines changed: 162 additions & 170 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
#+NAME: sassociation1
8-
#+BEGIN_SRC R :results output raw list
8+
#+BEGIN_SRC R :results output list org
99
library(data.table)
1010
readRDS("plfsdata/plfsacjdata.rds")->worker
1111
worker$standardwage->worker$wage
@@ -19,27 +19,30 @@
1919
#+end_src
2020

2121
#+RESULTS: sassociation1
22-
+ Pearson's product-moment correlation
23-
+ data: worker$wage and worker$years_edu
24-
+ t = 35.998, df = 37633, p-value < 0.00000000000000022
25-
+ alternative hypothesis: true correlation is not equal to 0
26-
+ 95 percent confidence interval:
27-
+ 0.1726625 0.1921962
28-
+ sample estimates:
29-
+ cor
30-
+ 0.1824473
31-
+ Pearson's product-moment correlation
32-
+ data: worker$wage and worker$age
33-
+ t = 9.3777, df = 37633, p-value < 0.00000000000000022
34-
+ alternative hypothesis: true correlation is not equal to 0
35-
+ 95 percent confidence interval:
36-
+ 0.03819950 0.05835859
37-
+ sample estimates:
38-
+ cor
39-
+ 0.04828396
22+
#+begin_src org
23+
- Pearson's product-moment correlation
24+
- data: worker$wage and worker$years_edu
25+
- t = 35.998, df = 37633, p-value < 0.00000000000000022
26+
- alternative hypothesis: true correlation is not equal to 0
27+
- 95 percent confidence interval:
28+
- 0.1726625 0.1921962
29+
- sample estimates:
30+
- cor
31+
- 0.1824473
32+
- Pearson's product-moment correlation
33+
- data: worker$wage and worker$age
34+
- t = 9.3777, df = 37633, p-value < 0.00000000000000022
35+
- alternative hypothesis: true correlation is not equal to 0
36+
- 95 percent confidence interval:
37+
- 0.03819950 0.05835859
38+
- sample estimates:
39+
- cor
40+
- 0.04828396
41+
#+end_src
42+
4043

4144
#+NAME: sassociation2
42-
#+BEGIN_SRC R :results output raw
45+
#+BEGIN_SRC R :results output list org
4346
lm(wage~sex+age+years_edu,
4447
data=worker)->t
4548
summary(t)
@@ -56,156 +59,145 @@
5659
#+end_src
5760

5861
#+RESULTS: sassociation2
59-
Call:
60-
lm(formula = wage ~ sex
61-
age
62-
years_edu, data = worker)
63-
64-
Residuals:
65-
Min 1Q Median 3Q Max
66-
-292.30 -74.80 -14.61 57.25 2170.72
67-
68-
Coefficients:
69-
Estimate Std. Error t value Pr(>|t|)
70-
(Intercept) 327.62380 3.44462 95.11 <0.0000000000000002 ***
71-
sex -97.04291 1.67477 -57.94 <0.0000000000000002 ***
72-
age 1.38151 0.05526 25.00 <0.0000000000000002 ***
73-
years_edu 4.48268 0.15777 28.41 <0.0000000000000002 ***
74-
---
75-
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
76-
77-
Residual standard error: 121.9 on 37631 degrees of freedom
78-
Multiple R-squared: 0.1261, Adjusted R-squared: 0.126
79-
F-statistic: 1809 on 3 and 37631 DF, p-value: < 0.00000000000000022
80-
81-
Call:
82-
lm(formula = wage ~ sex
83-
age
84-
years_edu
85-
sector
86-
social_group
87-
88-
religion
89-
quarter, data = worker)
90-
91-
Residuals:
92-
Min 1Q Median 3Q Max
93-
-315.65 -72.11 -14.15 52.51 2140.20
94-
95-
Coefficients:
96-
Estimate Std. Error t value Pr(>|t|)
97-
(Intercept) 257.94757 3.99129 64.628 < 0.0000000000000002 ***
98-
sex -86.56036 1.65149 -52.414 < 0.0000000000000002 ***
99-
age 1.23305 0.05423 22.735 < 0.0000000000000002 ***
100-
years_edu 3.76046 0.15523 24.225 < 0.0000000000000002 ***
101-
sector2 30.32294 1.41191 21.477 < 0.0000000000000002 ***
102-
social_group2 29.29921 2.21158 13.248 < 0.0000000000000002 ***
103-
social_group3 38.85215 2.10791 18.432 < 0.0000000000000002 ***
104-
social_group9 36.39078 2.37599 15.316 < 0.0000000000000002 ***
105-
religion2 15.28020 1.88933 8.088 0.000000000000000626 ***
106-
religion3 70.06425 3.05735 22.917 < 0.0000000000000002 ***
107-
religion4 0.90753 4.34322 0.209 0.834486
108-
religion5 9.92952 16.27422 0.610 0.541774
109-
religion6 -27.61440 5.46808 -5.050 0.000000443610331942 ***
110-
religion7 -28.12453 44.72117 -0.629 0.529427
111-
religion9 22.53928 5.90700 3.816 0.000136 ***
112-
quarterQ2 11.19254 1.98958 5.626 0.000000018618898647 ***
113-
quarterQ3 15.15791 1.89871 7.983 0.000000000000001465 ***
114-
quarterQ4 25.67351 1.85931 13.808 < 0.0000000000000002 ***
115-
quarterQ5 32.23325 2.39793 13.442 < 0.0000000000000002 ***
116-
---
117-
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
118-
119-
Residual standard error: 118.3 on 37616 degrees of freedom
120-
Multiple R-squared: 0.1778, Adjusted R-squared: 0.1774
121-
F-statistic: 451.8 on 18 and 37616 DF, p-value: < 0.00000000000000022
122-
123-
Call:
124-
lm(formula = wage ~ sex
125-
age
126-
years_edu
127-
sector
128-
social_group
129-
130-
religion
131-
quarter
132-
state, data = worker)
133-
134-
Residuals:
135-
Min 1Q Median 3Q Max
136-
-421.28 -53.87 -3.68 47.22 1919.02
137-
138-
Coefficients:
139-
Estimate Std. Error t value Pr(>|t|)
140-
(Intercept) 444.01115 4.77338 93.018 < 0.0000000000000002 ***
141-
sex -90.39577 1.35581 -66.673 < 0.0000000000000002 ***
142-
age 0.09864 0.04447 2.218 0.026552 *
143-
years_edu 0.78564 0.12845 6.116 0.00000000096630021 ***
144-
sector2 20.38448 1.17589 17.335 < 0.0000000000000002 ***
145-
social_group2 8.16327 1.89780 4.301 0.00001701239040995 ***
146-
social_group3 7.00001 1.82389 3.838 0.000124 ***
147-
social_group9 14.48824 2.02081 7.170 0.00000000000076649 ***
148-
religion2 3.06706 1.61097 1.904 0.056937 .
149-
religion3 3.99327 3.09503 1.290 0.196982
150-
religion4 1.21196 4.75423 0.255 0.798784
151-
religion5 18.31698 13.00836 1.408 0.159112
152-
religion6 11.40087 4.59791 2.480 0.013158 *
153-
religion7 1.18490 35.69842 0.033 0.973522
154-
religion9 22.95917 4.86976 4.715 0.00000243003135992 ***
155-
quarterQ2 10.21411 1.58877 6.429 0.00000000013002120 ***
156-
quarterQ3 16.82258 1.51923 11.073 < 0.0000000000000002 ***
157-
quarterQ4 25.14926 1.49016 16.877 < 0.0000000000000002 ***
158-
quarterQ5 33.08983 1.95044 16.965 < 0.0000000000000002 ***
159-
state02 -68.16250 5.62831 -12.111 < 0.0000000000000002 ***
160-
state03 -96.24984 5.63379 -17.084 < 0.0000000000000002 ***
161-
state04 -71.16512 23.87015 -2.981 0.002872 **
162-
state05 -115.06098 7.55209 -15.236 < 0.0000000000000002 ***
163-
state06 -69.65578 5.27142 -13.214 < 0.0000000000000002 ***
164-
state07 -46.63160 13.00126 -3.587 0.000335 ***
165-
state08 -93.14096 4.86947 -19.128 < 0.0000000000000002 ***
166-
state09 -130.45617 4.11177 -31.728 < 0.0000000000000002 ***
167-
state1 -14.79943 6.61379 -2.238 0.025249 *
168-
state10 -111.30326 4.22934 -26.317 < 0.0000000000000002 ***
169-
state11 -30.89194 13.71763 -2.252 0.024329 *
170-
state12 -69.11195 8.17680 -8.452 < 0.0000000000000002 ***
171-
state13 -23.54944 16.54163 -1.424 0.154557
172-
state14 -58.14358 5.19732 -11.187 < 0.0000000000000002 ***
173-
state15 -67.54526 6.62181 -10.200 < 0.0000000000000002 ***
174-
state16 -45.92342 5.48738 -8.369 < 0.0000000000000002 ***
175-
state17 -53.92123 6.67236 -8.081 0.00000000000000066 ***
176-
state18 -86.09270 4.86428 -17.699 < 0.0000000000000002 ***
177-
state19 -150.31537 3.89883 -38.554 < 0.0000000000000002 ***
178-
state2 -56.38856 11.04817 -5.104 0.00000033437294375 ***
179-
state20 -137.77298 4.59079 -30.011 < 0.0000000000000002 ***
180-
state21 -147.27217 4.45380 -33.067 < 0.0000000000000002 ***
181-
state22 -172.27146 4.70857 -36.587 < 0.0000000000000002 ***
182-
state23 -161.52791 4.12939 -39.117 < 0.0000000000000002 ***
183-
state24 -145.44044 4.54569 -31.995 < 0.0000000000000002 ***
184-
state25 -63.12764 47.32958 -1.334 0.182281
185-
state26 -102.84861 30.08812 -3.418 0.000631 ***
186-
state27 -142.91329 3.89854 -36.658 < 0.0000000000000002 ***
187-
state28 -84.41173 4.12350 -20.471 < 0.0000000000000002 ***
188-
state29 -100.69647 4.08499 -24.650 < 0.0000000000000002 ***
189-
state3 -121.25472 6.44927 -18.801 < 0.0000000000000002 ***
190-
state30 25.50491 11.26961 2.263 0.023632 *
191-
state31 112.13284 13.52131 8.293 < 0.0000000000000002 ***
192-
state32 146.37176 4.10836 35.628 < 0.0000000000000002 ***
193-
state33 -40.33733 3.97872 -10.138 < 0.0000000000000002 ***
194-
state34 -61.09002 6.25575 -9.765 < 0.0000000000000002 ***
195-
state35 17.72228 8.72443 2.031 0.042227 *
196-
state36 -85.02720 4.53862 -18.734 < 0.0000000000000002 ***
197-
state4 -68.28980 27.50122 -2.483 0.013027 *
198-
state5 -144.20165 8.92408 -16.159 < 0.0000000000000002 ***
199-
state6 -71.93804 8.39931 -8.565 < 0.0000000000000002 ***
200-
state7 -41.36610 17.62915 -2.346 0.018958 *
201-
state8 -103.71783 6.46870 -16.034 < 0.0000000000000002 ***
202-
state9 -152.19543 5.27778 -28.837 < 0.0000000000000002 ***
203-
---
204-
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
205-
206-
Residual standard error: 94.36 on 37572 degrees of freedom
207-
Multiple R-squared: 0.4771, Adjusted R-squared: 0.4763
208-
F-statistic: 553 on 62 and 37572 DF, p-value: < 0.00000000000000022
62+
#+begin_src org
63+
- Call:
64+
- lm(formula = wage ~ sex
65+
- age
66+
- years_edu, data = worker)
67+
- Residuals:
68+
- Min 1Q Median 3Q Max
69+
- -292.30 -74.80 -14.61 57.25 2170.72
70+
- Coefficients:
71+
- Estimate Std. Error t value Pr(>|t|)
72+
- (Intercept) 327.62380 3.44462 95.11 <0.0000000000000002 ***
73+
- sex -97.04291 1.67477 -57.94 <0.0000000000000002 ***
74+
- age 1.38151 0.05526 25.00 <0.0000000000000002 ***
75+
- years_edu 4.48268 0.15777 28.41 <0.0000000000000002 ***
76+
- ---
77+
- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
78+
- Residual standard error: 121.9 on 37631 degrees of freedom
79+
- Multiple R-squared: 0.1261, Adjusted R-squared: 0.126
80+
- F-statistic: 1809 on 3 and 37631 DF, p-value: < 0.00000000000000022
81+
- Call:
82+
- lm(formula = wage ~ sex
83+
- age
84+
- years_edu
85+
- sector
86+
- social_group
87+
- religion
88+
- quarter, data = worker)
89+
- Residuals:
90+
- Min 1Q Median 3Q Max
91+
- -315.65 -72.11 -14.15 52.51 2140.20
92+
- Coefficients:
93+
- Estimate Std. Error t value Pr(>|t|)
94+
- (Intercept) 257.94757 3.99129 64.628 < 0.0000000000000002 ***
95+
- sex -86.56036 1.65149 -52.414 < 0.0000000000000002 ***
96+
- age 1.23305 0.05423 22.735 < 0.0000000000000002 ***
97+
- years_edu 3.76046 0.15523 24.225 < 0.0000000000000002 ***
98+
- sector2 30.32294 1.41191 21.477 < 0.0000000000000002 ***
99+
- social_group2 29.29921 2.21158 13.248 < 0.0000000000000002 ***
100+
- social_group3 38.85215 2.10791 18.432 < 0.0000000000000002 ***
101+
- social_group9 36.39078 2.37599 15.316 < 0.0000000000000002 ***
102+
- religion2 15.28020 1.88933 8.088 0.000000000000000626 ***
103+
- religion3 70.06425 3.05735 22.917 < 0.0000000000000002 ***
104+
- religion4 0.90753 4.34322 0.209 0.834486
105+
- religion5 9.92952 16.27422 0.610 0.541774
106+
- religion6 -27.61440 5.46808 -5.050 0.000000443610331942 ***
107+
- religion7 -28.12453 44.72117 -0.629 0.529427
108+
- religion9 22.53928 5.90700 3.816 0.000136 ***
109+
- quarterQ2 11.19254 1.98958 5.626 0.000000018618898647 ***
110+
- quarterQ3 15.15791 1.89871 7.983 0.000000000000001465 ***
111+
- quarterQ4 25.67351 1.85931 13.808 < 0.0000000000000002 ***
112+
- quarterQ5 32.23325 2.39793 13.442 < 0.0000000000000002 ***
113+
- ---
114+
- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
115+
- Residual standard error: 118.3 on 37616 degrees of freedom
116+
- Multiple R-squared: 0.1778, Adjusted R-squared: 0.1774
117+
- F-statistic: 451.8 on 18 and 37616 DF, p-value: < 0.00000000000000022
118+
- Call:
119+
- lm(formula = wage ~ sex
120+
- age
121+
- years_edu
122+
- sector
123+
- social_group
124+
- religion
125+
- quarter
126+
- state, data = worker)
127+
- Residuals:
128+
- Min 1Q Median 3Q Max
129+
- -421.28 -53.87 -3.68 47.22 1919.02
130+
- Coefficients:
131+
- Estimate Std. Error t value Pr(>|t|)
132+
- (Intercept) 444.01115 4.77338 93.018 < 0.0000000000000002 ***
133+
- sex -90.39577 1.35581 -66.673 < 0.0000000000000002 ***
134+
- age 0.09864 0.04447 2.218 0.026552 *
135+
- years_edu 0.78564 0.12845 6.116 0.00000000096630021 ***
136+
- sector2 20.38448 1.17589 17.335 < 0.0000000000000002 ***
137+
- social_group2 8.16327 1.89780 4.301 0.00001701239040995 ***
138+
- social_group3 7.00001 1.82389 3.838 0.000124 ***
139+
- social_group9 14.48824 2.02081 7.170 0.00000000000076649 ***
140+
- religion2 3.06706 1.61097 1.904 0.056937 .
141+
- religion3 3.99327 3.09503 1.290 0.196982
142+
- religion4 1.21196 4.75423 0.255 0.798784
143+
- religion5 18.31698 13.00836 1.408 0.159112
144+
- religion6 11.40087 4.59791 2.480 0.013158 *
145+
- religion7 1.18490 35.69842 0.033 0.973522
146+
- religion9 22.95917 4.86976 4.715 0.00000243003135992 ***
147+
- quarterQ2 10.21411 1.58877 6.429 0.00000000013002120 ***
148+
- quarterQ3 16.82258 1.51923 11.073 < 0.0000000000000002 ***
149+
- quarterQ4 25.14926 1.49016 16.877 < 0.0000000000000002 ***
150+
- quarterQ5 33.08983 1.95044 16.965 < 0.0000000000000002 ***
151+
- state02 -68.16250 5.62831 -12.111 < 0.0000000000000002 ***
152+
- state03 -96.24984 5.63379 -17.084 < 0.0000000000000002 ***
153+
- state04 -71.16512 23.87015 -2.981 0.002872 **
154+
- state05 -115.06098 7.55209 -15.236 < 0.0000000000000002 ***
155+
- state06 -69.65578 5.27142 -13.214 < 0.0000000000000002 ***
156+
- state07 -46.63160 13.00126 -3.587 0.000335 ***
157+
- state08 -93.14096 4.86947 -19.128 < 0.0000000000000002 ***
158+
- state09 -130.45617 4.11177 -31.728 < 0.0000000000000002 ***
159+
- state1 -14.79943 6.61379 -2.238 0.025249 *
160+
- state10 -111.30326 4.22934 -26.317 < 0.0000000000000002 ***
161+
- state11 -30.89194 13.71763 -2.252 0.024329 *
162+
- state12 -69.11195 8.17680 -8.452 < 0.0000000000000002 ***
163+
- state13 -23.54944 16.54163 -1.424 0.154557
164+
- state14 -58.14358 5.19732 -11.187 < 0.0000000000000002 ***
165+
- state15 -67.54526 6.62181 -10.200 < 0.0000000000000002 ***
166+
- state16 -45.92342 5.48738 -8.369 < 0.0000000000000002 ***
167+
- state17 -53.92123 6.67236 -8.081 0.00000000000000066 ***
168+
- state18 -86.09270 4.86428 -17.699 < 0.0000000000000002 ***
169+
- state19 -150.31537 3.89883 -38.554 < 0.0000000000000002 ***
170+
- state2 -56.38856 11.04817 -5.104 0.00000033437294375 ***
171+
- state20 -137.77298 4.59079 -30.011 < 0.0000000000000002 ***
172+
- state21 -147.27217 4.45380 -33.067 < 0.0000000000000002 ***
173+
- state22 -172.27146 4.70857 -36.587 < 0.0000000000000002 ***
174+
- state23 -161.52791 4.12939 -39.117 < 0.0000000000000002 ***
175+
- state24 -145.44044 4.54569 -31.995 < 0.0000000000000002 ***
176+
- state25 -63.12764 47.32958 -1.334 0.182281
177+
- state26 -102.84861 30.08812 -3.418 0.000631 ***
178+
- state27 -142.91329 3.89854 -36.658 < 0.0000000000000002 ***
179+
- state28 -84.41173 4.12350 -20.471 < 0.0000000000000002 ***
180+
- state29 -100.69647 4.08499 -24.650 < 0.0000000000000002 ***
181+
- state3 -121.25472 6.44927 -18.801 < 0.0000000000000002 ***
182+
- state30 25.50491 11.26961 2.263 0.023632 *
183+
- state31 112.13284 13.52131 8.293 < 0.0000000000000002 ***
184+
- state32 146.37176 4.10836 35.628 < 0.0000000000000002 ***
185+
- state33 -40.33733 3.97872 -10.138 < 0.0000000000000002 ***
186+
- state34 -61.09002 6.25575 -9.765 < 0.0000000000000002 ***
187+
- state35 17.72228 8.72443 2.031 0.042227 *
188+
- state36 -85.02720 4.53862 -18.734 < 0.0000000000000002 ***
189+
- state4 -68.28980 27.50122 -2.483 0.013027 *
190+
- state5 -144.20165 8.92408 -16.159 < 0.0000000000000002 ***
191+
- state6 -71.93804 8.39931 -8.565 < 0.0000000000000002 ***
192+
- state7 -41.36610 17.62915 -2.346 0.018958 *
193+
- state8 -103.71783 6.46870 -16.034 < 0.0000000000000002 ***
194+
- state9 -152.19543 5.27778 -28.837 < 0.0000000000000002 ***
195+
- ---
196+
- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
197+
- Residual standard error: 94.36 on 37572 degrees of freedom
198+
- Multiple R-squared: 0.4771, Adjusted R-squared: 0.4763
199+
- F-statistic: 553 on 62 and 37572 DF, p-value: < 0.00000000000000022
200+
#+end_src
209201

210202
#+NAME: sassociation3
211203
#+BEGIN_SRC R :results output graphics :file bsample2.png :width 2500 :height 1500 :res 300

0 commit comments

Comments
 (0)