Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: [Fwd: st: RE: compare models]


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   stata list <statalist@hsphsun2.harvard.edu>
Subject   Re: [Fwd: st: RE: compare models]
Date   Tue, 15 Apr 2008 14:07:57 +0100 (BST)

--- mmolina@uniroma3.it asked:
> > I have to make a regression within a data panel and I received
> > this errors: once as the variabile have not been created and the
> > other time as the variable already exists.
> >
> >  gen lwbill=log(1+wbill)
> > lwbill already defined
> > r(110);
> >
> > . gen ltfp1_ols = lrva - _b[lrk]*lrk - _b[lwbill]*lwbill-
> > _b[lrm]*lrm if e(sample)
> > [lwbill] not found
> > r(111);

--- Maarten Buis answered:
> It means that lwbill could not be found in your model, maybe it is
> not part of the first equation, or maybe you forgot it.

--- mmolina@uniroma3.it wrote:
> could you please telll me what do you mean when you talk about 
> "the first eqution"? How do I recognize wich of the equations
> would be consider?

This is best explained using an example. The output of some commands,
for example -heckman- consists of multiple equations. In the example
below, the first equation explains the wage with educ and age, while
the second equation explains whether or not a women works with married,
children, educ, and age. By default Stata assumes you are refering to
the first equation, when you ask for the value of a parameter, so if
you want the parameter of children you have to specify that Stata has
to look in the equation select. You can see that in the output, or you
can display the matrix of parameters, if there are multiple equations,
the first collumnname is the equation and the second is the variable
name.

Hope this helps,
Maarten

*---------- begin example -----------------
webuse womenwk
heckman wage educ age, ///
        select(married children educ age)
matrix list e(b)
di _b[children]
di [select]_b[children]
*----------- end example -------------------
(For more on how to use examples I sent to the Statalist, see
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )


-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      ___________________________________________________________ 
Yahoo! For Good helps you make a difference  

http://uk.promotions.yahoo.com/forgood/
*
*   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