[R] logistic regression - unequal groups in R
dwinsemius at comcast.net
Thu Feb 26 02:04:38 CET 2009
On Feb 25, 2009, at 7:36 PM, ekwaters wrote:
> I am getting a repeated error when I try to run a logistic
> regression in R
> Error in model.frame.default(formula = prop1 ~ x1, data = glm1,
> weights =
> nt1, :
> invalid type (list) for variable 'x1'
The interpreter was expecting a vector for x1 and you gave it a list.
> x1 is multistate categorical (3 categories). 2 of the categories
> have 12
> observation, one has 9. Is this what it is objecting to?
> Do I have to have equal numbers of observations of all categories in
> nt1 is the total number of events for which p1 is the success
> each is linked with a category, vis..
> V1 V1 V1
> 1 1.00000000 cc 10
> 2 0.73333333 cc 15
> 3 0.04761905 cc 21
Does not look like a properly constructed dataframe. Such would not
have had three columns with identical names. What does str(glm1) show?
> Probably a newbie error either in data setup, but assistacne would be
> View this message in context: http://www.nabble.com/logistic-regression---unequal-groups-in-R-tp22215299p22215299.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help