// Task 1 routine setup capture log close set more off estimates clear log using cda02c-ex2done.log, replace text version 9.2 set scheme s2mono // pgm: cda02c-ex2done.do // task: 2 - Linear Regression - Excercise // project: CDA Lab Guide // author: your name // date: today's date use science3, clear // Task 2: Keep four variables including cit9, fel, female and mcit3. // Examine these variables, drop missing cases, and draw scatter plots. // Step 2.1 keep the variables cit9, fel, female and mcit3. keep cit9 fel female mcit3 // Step 2.2 examine variables codebook , compact sum cit9 fel mcit3 tab female , m // Step 2.3 drop missing cases. mark nomiss markout nomiss cit9 fel female mcit3 tab nomiss keep if nomiss==1 drop nomiss // Step 2.4 graph matrix to explore your variables. graph matrix cit9 fel female mcit3, half graph export cda02c-ex2-fig1.emf, replace // Task 3: Estimate an OLS regression and list coefficients. // Step 3.1 run a regression of cit9 on fel, female and mcit3. regress cit9 fel female mcit3 // Step 3.2 list the standardized coefficients listcoef, help // Task 4: Interpret the standardized and unstandardized coefficients. // Task 4a: Interpret the unstandardized effect of fel on cit9. /* Type your answer here For a unit increase in a scientist's doctoral prestige, the number of citations received by a scientists during years 6 to 9 are expected to increase by 3.7, holding all other variables constant. */ // Task 4b: Interpret the standardized effects of fel on cit9. /* Type your answer here ** x-standardized: For a standard deviation increase in the prestige of a scientist's doctoral program, the number of citations is expected to increases by 3.6, holding all other variables constant. ** y-standardized: For a unit increase in doctoral prestige, a scientist's expected number of citations is expected to increase by 0.14 standard deviations, holding all other variables constant. ** fully-standardized: For a standard deviation increase in doctoral prestige, the number of citations a scientist receives in years 6 to 9 is expected to increase by .14 standard deviations, holding all other variables constant. */ // Task 4c: Interpret the unstandardized effect of being female on cit9. /* Type your answer here Being a female decreases a scientist's citations in years six through nine by 8.2, holding all other variables constant. */ // Step 4d Interpret the standardized effects of being female on cit9. /* Type your answer here ** y-standardized Being a female decreases the expected number of citations by 0.325 standard deviation, holding all other variables constant. */ log close exit