[R] WLS in R
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri May 19 07:42:49 CEST 2006
This is not really weighted least squares, since the weights depend on the
parameters beta_*: WLS refers to pre-specified weights and can be done by
lm().
It looks very like an approximation to logistic regression, which can be
fitted by glm. But fits for this model can be done by nls (see the
example using Weighted.MM) or by direct optimization of the criterion.
On Thu, 18 May 2006, Karabi Sinha wrote:
>
> Can anyone offer any help with coding the following in R?
>
> I want to find (and store) Weighted Least Squares estimates of the
> regression parameters for the following model:
>
> z_i = beta_0 + beta_1.x_i + e_i; i=1,2,...,m
>
> where e ~ N[0, 1/(ni.pi.(1-pi))], sum(ni)=n
>
> and pi = exp(beta_0+beta_1.x_i)/[1+exp(beta_0+beta_1.x_i)].
>
> Any help on this will be greatly appreciated.
>
> Sincerely,
>
> Karabi Sinha, Ph.D.
> Assistant Professor of Biostatistics
> Division of Epidemiology and Biostatistics
> University of Illinois at Chicago
> 1603 W Taylor, Rm 951
> Chicago, IL 60612
> Phone: (312) 355-3611
> Fax : (312) 996-0064
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list