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 <>
Subject   Re: st: programming non-linear squares in Stata
Date   Thu, 15 Mar 2007 21:41:45 +0000 (GMT)

--- Maritza <> 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: for various
recources on that.

Hope this helps,

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

New Yahoo! Mail is the ultimate force in competitive emailing. Find out more at the Yahoo! Mail Championships. Plus: play games and win prizes.* 
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index