Skip to content
Back to formatted view

Raw Message

Message-ID: <CAAS1aP9Gik7Czg-++byZQUp5hJY1+bQ_n9Tzqd=pxp+rN2hAjA@mail.gmail.com>
Date: 2012-05-31T22:04:27Z
From: Yue Guan
Subject: bigglm binomial negative fitted value
In-Reply-To: <CAJ55+dJ-hZ3FW2+c7k6MDX8U=5gP74ON_m5cjQNtdD54Rkt9Tw@mail.gmail.com>

Thank you very much. I do overlook something.....

On Thu, May 31, 2012 at 5:20 PM, Thomas Lumley <tlumley at uw.edu> wrote:
> On Fri, Jun 1, 2012 at 1:17 AM, Yue Guan <pipehappy at gmail.com> wrote:
>> Hi, there
>>
>> Since glm cannot handle factors very well. I try to use bigglm like this:
>>
>> logit_model <- bigglm(responser~var1+var2+var3, data, chunksize=1000,
>> family=binomial(), weights=~trial, sandwich=FALSE)
>>
>> fitted <- predict(logit_model, data)
>>
>> only var2 is factor, var1 and var3 are numeric.
>>
>> I expect fitted should be a vector of value falls in (0,1)
>>
>> However, I get something like this:
>> str(fitted)
>> ?num [1:260617, 1] -0.0564 -0.0564 -0.1817 -0.1842 -0.1852 ...
>> ?- attr(*, "dimnames")=List of 2
>> ?..$ : chr [1:260617] "1" "2" "3" "4" ...
>> ?..$ : NULL
>>
>
> As the help says, the default is predictions of the linear predictor.
> To get predictions of the probability, use type="response"
>
> ? -thomas
>
> --
> Thomas Lumley
> Professor of Biostatistics
> University of Auckland