QUESTION 3 - ANSWER

Do you think that students would have particularly strong feelings for or against allowing HIV positive teachers to continue in school? Create a student dummy variable using the information in labor market status (lmstat), and include this as a regressor in your linear probability model. Are students more or less likely to answer the question in the affirmative? Is this relationship between being a student and the response to the question a statistically significant relationship?

 

Creating the student dummy:

gen student=.
replace student=1 if lmstat==3
replace student=0 if lmstat<=6&lmstat!=3

Now running the regression:

xi: reg hivteach age female educ i.location student
 
      Source |       SS       df       MS              Number of obs =    1654
-------------+------------------------------           F(  6,  1647) =   50.60
       Model |  63.5965143     6  10.5994191           Prob > F      =  0.0000
    Residual |  345.006267  1647  .209475572           R-squared     =  0.1556
-------------+------------------------------           Adj R-squared =  0.1526
       Total |  408.602781  1653  .247188615           Root MSE      =  .45769
------------------------------------------------------------------------------
    hivteach |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         age |   .0032945   .0013232     2.49   0.013     .0006993    .0058898
      female |   .0848469   .0237354     3.57   0.000     .0382921    .1314018
        educ |   .0614732   .0043459    14.15   0.000     .0529492    .0699972
_Ilocation_2 |  -.0968642   .0309519    -3.13   0.002    -.1575734   -.0361549
_Ilocation_3 |  -.1215313   .0289839    -4.19   0.000    -.1783804   -.0646821
     student |  -.0259652   .0286079    -0.91   0.364    -.0820768    .0301464
       _cons |   .0223767   .0668548     0.33   0.738    -.1087526    .1535061
------------------------------------------------------------------------------

We can see here that students are about 2.5% less likely to give a yes response to the question, although this coefficient is not significantly different from zero.

Also, notice that since we coded so many missing values of student, the sample size has dropped substantially, as Stata ignores any observations which have missing information in any of the X or Y variables. In most empirical work, you want to be careful that all your analysis is done in terms of a consistent sample, especially if you are comparing and contrasting results from several regressions.

 

Back to Questions