Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

Re: st: bX


From   Chiara Mussida <cmussida@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: bX
Date   Sat, 31 Mar 2012 12:53:52 +0200

ok. I now see the matrix of results and I want to gen a scalar for
each occupation and gender combination. I have 7 occupation and fem is
the dummy for gender, the scalar are the 14 b in the matrix:
what do command should gen those scalars after-
for values 1/7 command?
Thanks
Chiara


On 30/03/2012, Christopher Baum <kit.baum@bc.edu> wrote:
> <>
> Chiara said
>
> margins, by(married occupation)
> gives me the product between the Betas of the estimated wage reg and
> the mean value of characteristics for each occupation, for married and
> unmarried. Right?
>
> Correct.
>
> She then said
>
> margins, by(fem occupation)
> gives me all the values of the interactions between fem#occupation,
> therefore a total of 14 interactions (2 genders*7 occupations):
> ...
> is it possible to gen a new variable for each of the listet interaction?
> For example, a variable taking the value 2.398703, etc. This is useful
> for me, since therafter I have to compute calculations by using these
> interactions.
>
>
> You don't need a set of variables; these are scalar quantities. Any
> computations you want to do you can do with
> what comes back from margins. After giving the margins command, type
>
> mat list r(table)
>
> and you will find all of those numbers. You can then do something like (in
> the example I gave, there are 26 conditonal means):
>
> forv i=1/26 {
> 	 sca mu`i' = res[1,`i']
> }
> di mu1
> di mu2
> ...
>
> Those scalars can be used to do any computations you need. You can also
> retrieve their standard errors
> if those are needed in the computation.
>
> Kit
>
> Kit Baum   |   Boston College Economics and DIW Berlin   |
> http://ideas.repec.org/e/pba1.html
> An Introduction to Stata Programming   |
> http://www.stata-press.com/books/isp.html
> An Introduction to Modern Econometrics Using Stata   |
> http://www.stata-press.com/books/imeus.html
>
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
>


-- 
Chiara Mussida
PhD candidate
Doctoral school of Economic Policy
Catholic University, Piacenza (Italy)
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index