Skip to content
Back to formatted view

Raw Message

Message-ID: <f8e6ff050903161956w5b0b692fof8362c6efdf57e37@mail.gmail.com>
Date: 2009-03-17T02:56:37Z
From: Hadley Wickham
Subject: - help - predicting with glmnet/lars for dataframes with different nrow then the train set
In-Reply-To: <a7a857280903161721n75fa38edlff1addcc9149f231@mail.gmail.com>

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/