Re: [R] predict.glm with constant non-zero response intercept

2013-08-27 Thread Michael Dewey
At 04:46 27/08/2013, Murat Tasan wrote: hi all -- i'm running into a strange problem that i can't seem to easily get around, but i'm probably just missing something obvious. I think you just subtract it from y. But perhaps I too am missing the obvious. i have a model to which some data is fi

[R] predict.glm with constant non-zero response intercept

2013-08-26 Thread Murat Tasan
hi all -- i'm running into a strange problem that i can't seem to easily get around, but i'm probably just missing something obvious. i have a model to which some data is fit using glm with no intercept term (using my data variables "x" and "y" and a specific link function "mylink"):

Re: [R] predict.glm

2010-01-16 Thread David Winsemius
On Jan 16, 2010, at 1:34 PM, Maurice Charbit wrote: Hi, See below I reply your message for <https://stat.ethz.ch/pipermail/r-help/2008-April/160966.html >[R] predict.glm & newdata posted on Fri Apr 4 21:02:24 CEST 2008 You say it ##works fine but it does not: if you look at

Re: [R] predict.glm

2010-01-16 Thread Peter Ehlers
wrote: Hi, See below I reply your message for <https://stat.ethz.ch/pipermail/r-help/2008-April/160966.html>[R] predict.glm & newdata posted on Fri Apr 4 21:02:24 CEST 2008 You say it ##works fine but it does not: if you look at the length of yhat2, you will find 100 and not 200

Re: [R] predict.glm

2010-01-16 Thread Maurice Charbit
Hi, See below I reply your message for <https://stat.ethz.ch/pipermail/r-help/2008-April/160966.html>[R] predict.glm & newdata posted on Fri Apr 4 21:02:24 CEST 2008 You say it ##works fine but it does not: if you look at the length of yhat2, you will find 100 and not 200 as ex

Re: [R] predict.glm -> which class does it predict?

2009-07-10 Thread Peter Dalgaard
As for why it's not the other way around, well, if it had been, then you could have asked the same question ...and come to think about it, it is rather convenient that it meshes with the default ordering of levels in factor(x) is x is 0/1 or FALSE/TRUE. -- O__ Peter Dalgaard

Re: [R] predict.glm -> which class does it predict?

2009-07-10 Thread Gabor Grothendieck
2009/7/10 Peter Dalgaard : > Peter Schüffler wrote: >> >> Hi, >> >> I have a question about logistic regression in R. >> >> Suppose I have a small list of proteins P1, P2, P3 that predict a >> two-class target T, say cancer/noncancer. Lets further say I know that I can >> build a simple logistic re

Re: [R] predict.glm -> which class does it predict?

2009-07-10 Thread Peter Dalgaard
Peter Schüffler wrote: Hi, I have a question about logistic regression in R. Suppose I have a small list of proteins P1, P2, P3 that predict a two-class target T, say cancer/noncancer. Lets further say I know that I can build a simple logistic regression model in R model <- glm(T ~ ., data=

Re: [R] predict.glm -> which class does it predict?

2009-07-10 Thread Marc Schwartz
On Jul 10, 2009, at 9:46 AM, Peter Schüffler wrote: Hi, I have a question about logistic regression in R. Suppose I have a small list of proteins P1, P2, P3 that predict a two-class target T, say cancer/noncancer. Lets further say I know that I can build a simple logistic regression model

[R] predict.glm -> which class does it predict?

2009-07-10 Thread Peter Schüffler
Hi, I have a question about logistic regression in R. Suppose I have a small list of proteins P1, P2, P3 that predict a two-class target T, say cancer/noncancer. Lets further say I know that I can build a simple logistic regression model in R model <- glm(T ~ ., data=d.f(Y), family=binomial)

Re: [R] predict.glm and predict.gam output

2009-06-19 Thread sw283
Anke, mgcv:predict.gam certainly didn't produce `something like a negative log-likelihood of occurrence', but is it possible that one of your maps is on the probability scale and the other on the linear predictor scale? If you used predict.glm(model1,type="response"), but predict.gam(model2

Re: [R] predict.glm and predict.gam output

2009-06-19 Thread Gavin Simpson
On Thu, 2009-06-18 at 13:23 -0600, Anke Konrad wrote: > Hi all, > > I am currently trying to compare different plant occurrence prediction > maps generated in R and exported into GRASS. One of these maps was > generated from a glm fitted to some data, and subsequently applying this > glm model

Re: [R] predict.glm and predict.gam output

2009-06-18 Thread David Winsemius
On Jun 18, 2009, at 3:23 PM, Anke Konrad wrote: Hi all, I am currently trying to compare different plant occurrence prediction maps generated in R and exported into GRASS. One of these maps was generated from a glm fitted to some data, and subsequently applying this glm model to a wider

[R] predict.glm and predict.gam output

2009-06-18 Thread Anke Konrad
Hi all, I am currently trying to compare different plant occurrence prediction maps generated in R and exported into GRASS. One of these maps was generated from a glm fitted to some data, and subsequently applying this glm model to a wider region using predict.glm. The outcome here was a prob

Re: [R] predict.glm predicted prob above 1?

2009-03-08 Thread Simon Blomberg
There is a bug in your code: Try reg2<-predict.glm(reg1, se.fit=T, data.frame(male=1, edu=1, married=1,inc=1, relig=1, YEAR=seq(1,33,1)), type="response") You put type="response" into your newdata frame, so it wasn't visible to predict.glm. So predict.glm assumed the default type, which is "link"

[R] predict.glm predicted prob above 1?

2009-03-08 Thread Kitty Lee
I have a puzzle When I include an interaction in the model, many predicted probabilities are above 1. Is that a problem with my model? I thought the predicted prob can't be bigger than 1... Any help would be really appreciated! Thanks! K. reg1<-glm(pyea~male+edu+married+inc+relig+factor(

Re: [R] predict.glm & newdata

2008-04-30 Thread Yasir Kaheil
gt; - > > -Ursprüngliche Nachricht- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im > Auftrag von Tom Guston > Gesendet: Friday, April 04, 2008 1:29 PM > An: r-help@r-project.org > Betreff: [R] predict.glm & newdata > > > Hi a

Re: [R] predict.glm & newdata

2008-04-04 Thread Daniel Malter
hricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Tom Guston Gesendet: Friday, April 04, 2008 1:29 PM An: r-help@r-project.org Betreff: [R] predict.glm & newdata Hi all - I'm stumped by the following mdl <- glm(resp ~ . , data = df, family=binomial, offset

[R] predict.glm & newdata

2008-04-04 Thread Tom Guston
Hi all - I'm stumped by the following mdl <- glm(resp ~ . , data = df, family=binomial, offset = ofst) WORKS yhat <- predict(mdl) WORKS yhat <- predict(mdl,newdata = df) FAILS Error in drop(X[, piv, drop = FALSE] %*% beta[piv]) : subscript out of bounds I've tried without offset, quoting