Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: 2 Questions about margeff: dummies and lincom


From   "Kristin J. Kleinjans" <kkleinjans@econ.dk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: 2 Questions about margeff: dummies and lincom
Date   Thu, 3 Nov 2005 13:56:19 +0100 (CET)

Dear Statalist,
I have 2 questions regarding the margeff command (that estimates average
marginal effects) by Tamas Bartus. I am using Stata 8SE.


1. I get an error using the command but am not sure what this implies. I
checked the "help for margeff" (May 22 2005) and the Stata Journal
submission by Bartus (22 April 2005).

Here is what I do:

I run a probit on
continuous variables: pnursy2, age2, logatota2
dummies (0/1): ragender healthbad2
categorical variables: riadla2 radla2 hchild2 rlivsib2
dummies with several categories: race2 race3, edu2 edu3    and
square terms: agesq2 riadlasq2 radlasq2

Here is what I get:

probit  rlivnhc6  pnursy2 age2 agesq2 ragender healthbad2 race2 race3
edu2 edu3 logatota2 riadla2 riadlasq2 radla2 radlasq2 hchild2 rlivsib2
if marp2==0&hchildf2==0, robust

Iteration 0:   log pseudolikelihood = -1057.8623
Iteration 1:   log pseudolikelihood = -927.72662
Iteration 2:   log pseudolikelihood =  -925.3291
Iteration 3:   log pseudolikelihood = -925.32287
Iteration 4:   log pseudolikelihood = -925.32287

Probit estimates                               Number of obs   = 2054
                                               Wald chi2(16)   = 237.65
Prob > chi2     =
0.0000
Log pseudolikelihood = -925.32287              Pseudo R2       = 0.1253

------------------------------------------------------------------------
          |               Robust
 rlivnhc6 |      Coef.   Std. Err.      z    P>|z|  [95% Conf. interval]
----------+-------------------------------------------------------------
  pnursy2 |    .002027    .001292     1.57   0.117    -.0005052 .0045592
     age2 |   .0714462   .0074125     9.64   0.000     .0569179 .0859744
   agesq2 |  -.0011711   .0008612    -1.36   0.174    -.0028591 .0005169
 ragender |   .0972772    .089316     1.09   0.276     -.077779 .2723334
healthbad2|   .1944082   .0768894     2.53   0.011     .0437077 .3451087
    race2 |  -.2096341   .1015799    -2.06   0.039   -.4087271 -.0105412
race3 |  -.0055086    .226881    -0.02   0.981   -.4501873  .4391701
     edu2 |    .000135   .0849145     0.00   0.999    -1662944  .1665644
edu3 |   .1068038   .0880652     1.21   0.225    -.0658009
.2794085
logatota2 |  -.0208433   .0077476    -2.69   0.007    -.0360283
-.0056583
  riadla2 |   .6766688   .1953894     3.46   0.001     .2937126 1.059625
riadlasq2 |  -.2465945   .0992594    -2.48   0.013    -.4411394
-.0520496
   radla2 |   .2762929   .1109397     2.49   0.013      .058855 .4937308
 radlasq2 |   -.083948   .0362853    -2.31   0.021    -.1550659  -.01283
  hchild2 |  -.0639309    .017976    -3.56   0.000    -.0991633
-.0286985
 rlivsib2 |  -.0305856   .0183409    -1.67   0.095    -.0665332  .005362
    _cons |  -6.227767    .600206   -10.38   0.000    -7.404149
-5.051385
---------------------------------------------------------------------------


. margeff, at(mean age2=78  agesq2=0 riadla2=0 riadlasq2=0 radla2=0
radlasq2=0) dummies(edu* race*) replace

Marginal effects at means on Prob(rlivnhc6==1) after probit
Variables set to specific values:  age2 agesq2 riadla2 riadlasq2 radla2
radlasq2

estimates post: matrix has missing values
r(504);



I don't get this result if instead I use this command:

. margeff, at(mean age2=78  agesq2=0 riadla2=0 riadlasq2=0 radla2=0
radlasq2=0) dummies(edu2 edu3 race2 race3) replace

- but I am not sure if that gives me the correct results with respect to
the variables edu and race


2. Also, I was wondering if somebody knows how to determine the
relative weights on the variables in using the lincom command to get the
joint marginal effect for a variable which is included both by itself
and as a square term?


Thanks a lot for your help,

Kristin


Kristin J. Kleinjans
University of Aarhus
Department of Economics
Building 322
8000 Aarhus C
Denmark
Phone: +45 8942 1624. Fax: +45 8613 6334
E-mail: kkleinjans@econ.au.dk



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index