Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st:how to match created matrix to the original data set


From   Mandy fu <[email protected]>
To   [email protected]
Subject   st:how to match created matrix to the original data set
Date   Tue, 18 Aug 2009 14:39:04 -0400

Hi all,

It would be great if you could give me some suggestion on the
following question about matrix operation for a survey data set. It is
like, based on  a data set, I create matrix. Then I  convert the
matrix into variables and want to add the new  variables into the
original data set. The problem is that I am not sure how to make sure
the ID number matches during the last step.

The data set includes respondents of  male (2517 obs)and female(2480
obs).First I run  earnings function for male and female separately.
Then I want to do a t test for comparing the group mean of (sum of
Xfemale*B'male ) and (sum of X'female *B'female). The former means the
earnings of a female when she is treated the same as a male with
identical endowment in labor market. The  latter means the predicted
value of how much a female earns.,

where Bmale:   the coefficients get for a regression for each male
          Bfemale: the coefficients get for a regression for each female
          Xmale:    the original values of independent variables for each male
          Xfemale: the original values of independent variables for each female




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index