Re: [R] logistic regression - using polys and products of features

From: ronggui <0034058_at_fudan.edu.cn>
Date: Sat 18 Jun 2005 - 03:05:51 EST

On Fri, 17 Jun 2005 07:39:30 +1000
Stephen Choularton <mail@bymouth.com> wrote:

> Hi
>
> I can get all my features by doing this:
>
> > logistic.model = glm(similarity ~ ., family=binomial, data =
> cData[3001:3800,])
>
>
> I can get the product of all my features by this:
>
> logistic.model = glm(similarity ~ . ^ 2, family=binomial, data =
> cData[3001:3800,])
>
> I don't seem to be able to get polys by doing this:
>
> logistic.model = glm(similarity ~ poly(.,2), family=binomial, data =
> cData[3001:3800,])
> Error in poly(., 2) : Object "." not found
> >
>
> How can I get polys?
>
> What do the warnings mean when I do this:
>
> > logistic.model = glm(similarity ~ . + . ^ 2, family=binomial, data =
> cData[3001:3800,])
> Warning messages:
> 1: Algorithm did not converge in: glm.fit(x = X, y = Y, weights =
> weights, start = start, etastart = etastart,
> 2: fitted probabilities numerically 0 or 1 occurred in: glm.fit(x = X, y
> = Y, weights = weights, start = start, etastart = etastart,

.^2 means all the 2-order and 1-order terms,so .+.^2 is meaningless.

> How can I do this?
>
> logistic.model = glm(similarity ~ . + . ^ 2 + poly(.,2),
> family=binomial, data = cData[3001:3800,])

>
> Thanks
>
> Stephen
>
>
>
>
> --
> Internal Virus Database is out-of-date.
> Checked by AVG Anti-Virus.
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@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

-- 
Department of Sociology
Fudan University,Shanghai
Blog:http://sociology.yculblog.com

______________________________________________
R-help@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
Received on Sat Jun 18 04:24:08 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:48 EST