Statalist


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

RE: st: Re: computation of R-squared with a non-linear model


From   Maarten buis <[email protected]>
To   [email protected]
Subject   RE: st: Re: computation of R-squared with a non-linear model
Date   Wed, 20 May 2009 08:27:31 +0000 (GMT)

--- "marcel spijkerman" wrote:
> > > I estimate a weighted non-linear model of the
> > > following form:
> > >
> > > y^0.5 = (a1 + a2*X)^0.5 weighted by some other
> > > variable z.
> > >
> > > Stata reports an adjusted R-squared of 1.000. I
> > > suspect this is not correct. How can compute the 
> > > correct adjusted R-squared using untransformed 
> > > variables?

--- Martin Weiss wrote:
> > Which command did you use for your estimation? If it
> > was non-linear, -nl-?
> > Show us what you typed and what the reply was...

--- On Wed, 20/5/09, marcel spijkerman wrote:
> I indeed typed the command:
> 
> nl (sqrt_y = (a1 + a2X)^0.5) [aweight= hhd1564_06] 
> 
> And the answer is .... :-)

It is surprising that you got output at all, as you 
did not specify any parameters. Anyhow, it appears that 
you have a convergence problem. So the next step is 
not to try to come up with some correct R^2, but to
fix the model. You could try specifing starting 
values. 

-- Maarten

Ps. -aweights- are very very very rarely the correct 
weight type. 

-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

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


      

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index