Statalist The Stata Listserver


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

Re: st: programming non-linear squares in Stata


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: programming non-linear squares in Stata
Date   Thu, 15 Mar 2007 21:41:45 +0000 (GMT)

--- Maritza <[email protected]> wrote:
> Somebody knows how to program a logistic distribution in Intercooled
> Stata 8.2 for Non-Linear Squares?. Stata offers two logistic
> functions but I need to apply this one: Y = 1/(1+exp(-b*X))
> I've tried to use the -User-supplied function- in the Non-Linear
> Statistics and every time I got an error message "varlist required"
> which could be because I have more than one explanatory  variable (I
> tried with just one, same error message)or because I need an specific
> indication that my data is longitudinal. 
> This is what I typed:
> 
> nl Y = 1/(1+exp(-b*X)) iitt avgtarif pdit tot lavrgdp lrdgpdif
> ldistancia     (the first one is the dependent variable)
 
why don't you just use -glm-? -glm iitt avgtarif pdit tot lavrgdp
lrdgpdif ldistancia, family(binomial) link(logit)- will fit that model
with maximum likelihood. If the dependent variable is a continuous
variable (e.g. a proportion) than you will also need to add the option
scale(x2) or the option robust to get correct standard errors.
Alternatively, you could use -betafit-, see:
http://home.fsw.vu.nl/m.buis/software/betafit.html for various
recources on that.

Hope this helps,
Maarten



-----------------------------------------
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/
-----------------------------------------


	
	
		
___________________________________________________________ 
New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes. 
http://uk.rd.yahoo.com/evt=44106/*http://mail.yahoo.net/uk 
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index