Hello, there.
I'm trying to teach a manual autodidactically Stata, but unfortunately I get stuck with the following exercises.
1) Controlling for gender, regress years of education (yedu) and age on addwor. Note: To interpret the intercept in a meaningful manner, you need to center metric independent variables.
2) Does the effect of years of education or age have a stronger effect on addwor controlling for age?
Here you can find the dataset I use:
https://workupload.com/file/eeSAb4SK
And I could already achieve the following results:
__________________________________________________ ___
//Part 1//
use data1
//Part 2//
egen addwor=anycount (wor*), values (1)
tab addwor, mis
//Part 3//
egen addwor_m = rowmiss(wor*)
tabulate addwor if addwor_m == 0
//Part4//
mean addwor //The mean for the Addwor variable is 3.356866//
//Part5//
recode addwor (0/4 = 1) (5/8 = 2) (9/12 = 3), gen (addwor_r)
tab addwor_r
//Part 6//
tab addwor sex
*The highest value on overall worries corresponds to female respondents; they are as such more worried about the future*
//Part 7//
reg addwor sex
replace addwor = 0 if sex == 1
replace addwor = 1 if sex == 2
reg addwor sex
__________________________________________________ __
Could someone help me answer the questions?
Thank you very much!
I'm trying to teach a manual autodidactically Stata, but unfortunately I get stuck with the following exercises.
1) Controlling for gender, regress years of education (yedu) and age on addwor. Note: To interpret the intercept in a meaningful manner, you need to center metric independent variables.
2) Does the effect of years of education or age have a stronger effect on addwor controlling for age?
Here you can find the dataset I use:
https://workupload.com/file/eeSAb4SK
And I could already achieve the following results:
__________________________________________________ ___
//Part 1//
use data1
//Part 2//
egen addwor=anycount (wor*), values (1)
tab addwor, mis
//Part 3//
egen addwor_m = rowmiss(wor*)
tabulate addwor if addwor_m == 0
//Part4//
mean addwor //The mean for the Addwor variable is 3.356866//
//Part5//
recode addwor (0/4 = 1) (5/8 = 2) (9/12 = 3), gen (addwor_r)
tab addwor_r
//Part 6//
tab addwor sex
*The highest value on overall worries corresponds to female respondents; they are as such more worried about the future*
//Part 7//
reg addwor sex
replace addwor = 0 if sex == 1
replace addwor = 1 if sex == 2
reg addwor sex
__________________________________________________ __
Could someone help me answer the questions?
Thank you very much!