[R] - help - predicting with glmnet/lars for dataframes with different nrow then the train set
hadley wickham
h.wickham at gmail.com
Tue Mar 17 03:56:37 CET 2009
On Mon, Mar 16, 2009 at 7:21 PM, eitan lavi <lavi.eitan at gmail.com> wrote:
> Hello
>
> I'm having trouble using lars and glmnet functions to predict on a new data
> set with different nrow then the original :
>
>
> for instance:
> =============
> log.1 = glm(temp.data$TL~(.),temp.data,family = binomial,x=TRUE,y=TRUE)
I don't know if this is the problem or not (you didn't supply a
reproducible example), but I'd expect your call to be:
log.1 <- glm(TL ~ ., data = temp.data , family = binomial , x = TRUE, y = TRUE)
i.e. when you supply a data frame you don't explicitly use it in the formula.
Hadley
--
http://had.co.nz/
More information about the R-help
mailing list