similar to: Warning with predict.glm method

Displaying 20 results from an estimated 30000 matches similar to: "Warning with predict.glm method"

2007 Feb 18
0
Predict(); Warning rank deficient matrix
I am trying to use lm() for resression followed by stepAIC function. Now when i try to use to predict for some input, predict() gives a warning : prediction from a Rank deficient matrix may be misleading. As I am new to R (or to statistics) How alarming this warning may be? Regards, ____________________________________________________________________________________ The fish are biting.
2004 Sep 23
0
followup: Re: Issue with predict() for glm models
Could you just use lines(newX, myPred, col=2) -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Paul Johnson Sent: Thursday, September 23, 2004 10:3 AM To: r help Subject: followup: Re: [R] Issue with predict() for glm models I have a follow up question that fits with this thread. Can you force an overlaid plot
2009 Oct 20
1
glm.fit to use LAPACK instead of LINPACK
Hi, I understand that the glm.fit calls LINPACK fortran routines instead of LAPACK because it can handle the 'rank deficiency problem'. If my data matrix is not rank deficient, would a glm.fit function which runs on LAPACK be faster? Would this be worthwhile to convert glm.fit to use LAPACK? Has anyone done this already?? What is the best way to do this? I'm looking at very
2005 May 31
3
lars / lasso with glm
We have been using Least Angle Regression (lars) to help identify predictors in models where the outcome is continuous. To do so we have been relying on the lars package. Theoretically, it should be possible to use the lars procedure within a general linear model (glm) framework - we are particular interested in a logistic regression model. Does anyone have examples of using lars with logistic
2008 Dec 28
1
Logistic regression with rcs() and inequality constraints?
Dear guRus, I am doing a logistic regression using restricted cubic splines via rcs(). However, the fitted probabilities should be nondecreasing with increasing predictor. Example: predictor <- seq(1,20) y <- c(rep(0,9),rep(1,10),0) model <- glm(y~rcs(predictor,n.knots=3),family="binomial") print(1/(1+exp(-predict(model)))) The last expression should be a nondecreasing
2010 Aug 03
1
Penalized Gamma GLM
Hi, I couldn't find a package to fit a penalized (lasso/ridge) Gamma regression model. Does anybody know any? Thanks in advance, Lars. [[alternative HTML version deleted]]
2017 Sep 14
0
vcov and survival
Dear Terry, It's not surprising that different modeling functions behave differently in this respect because there's no articulated standard. Please see my response to Martin for my take on the singular.ok argument. For a highly sophisticated user like you, singular.ok=TRUE isn't problematic -- you're not going to fail to notice an NA in the coefficient vector -- but I've
2008 May 28
1
confidence interval for the logit - predict.glm
Hello all, I've come across an online posting http://www.biostat.wustl.edu/archives/html/s-news/2001-10/msg00119.html that described how to get confidence intervals for predicted values from predict.glm. These instructions were meant for S-Plus. Yet, it generally seems to work with R too, but I am encountering some problems. I am explaining my procedure in the following and would be most
2001 Dec 02
1
GLM with ranks as response variable
Dear R's, I have a survey where customers rank a set of 5 packages for a product, so the response variable looks like a d b c a c d b d b a c Predictors variables are 4 socio-economic parameters. I have modelled the FIRST choice of each subject as a multinomial model, similar to the housing example in MASS ch7.3, , but I would prefer to use the whole rank-set instead. Can someone give me a
2001 Apr 05
1
predict.glm
Hello, Probably a stupidly easy question, but I have done the following in order to make predictions from a fitted glm with new data: my.glm <- glm(lt96~so296[,1:17],family=binomial(link=logit)) p96 <- predict.glm(my.glm,newdata=so293[,1:17],type="response") but I always get the fitted linear predictors from the original model, ie there doesn't seem to be acknowledgement of
2006 Mar 27
1
error message
Hi Does anyone know what this means: > glm.model = glm(formula = as.factor(nextDay) ~ ., family=binomial, data=spi[1:1000,]) > pred <- predict(glm.model, spi[1001:1250,-9], type="response") Warning message: prediction from a rank-deficient fit may be misleading in: predict.lm(object, newdata, se.fit, scale = 1, type = ifelse(type == 9 is my determinant and I still get
2012 Feb 08
0
glm.fit and pearson's correlation coefficient
I did a linear correlation of data using glm.fit and stored the output in the object "f": f <- glm.fit(x, y, w) I am intereseted in estimating the quality of the correlation. I am used to do it using pearson correlation coefficient "r" or "r^2". Can I extract this coefficient from the output of glm.fit? Is there another number in the output of glm.fit that
2008 Jan 03
1
GLM results different from GAM results without smoothing terms
Hi, I am fitting two models, a generalized linear model and a generalized additive model, to the same data. The R-Help tells that "A generalized additive model (GAM) is a generalized linear model (GLM) in which the linear predictor is given by a user specified sum of smooth functions of the covariates plus a conventional parametric component of the linear predictor." I am fitting the GAM
2012 Mar 19
1
glm: getting the confidence interval for an Odds Ratio, when using predict()
Say I fit a logistic model and want to calculate an odds ratio between 2 sets of predictors. It is easy to obtain the difference in the predicted logodds using the predict() function, and thus get a point-estimate OR. But I can't see how to obtain the confidence interval for such an OR. For example: model <- glm(chd ~age.cat + male + lowed, family=binomial(logit)) pred1 <-
2006 Mar 27
1
Glm poisson
Hello, I am using the glm model with a poisson distribution. The model runs just fine but when I try to get the null deviance for the model of the null degrees of freedom I get the following errors: > null.deviance(pAmeir_1) Error: couldn't find function "null.deviance" > df.null(pAmeir_1) Error: couldn't find function "df.null" When I do: >
2017 Jun 29
0
Help : glm p-values for a factor predictor
It might help if you provided the code you used. It's possible that you didn't use direction="backward" in stepAIC(). Or if you did, it was still running, so whatever else you try will still be slow. The statement "R provides only the pvalues for each level" is wrong: look at the anova() function. Bob On 29 June 2017 at 11:13, Beno?t PELE <benoit.pele at
2010 Jan 02
1
Please help me!!!! Error in `[.data.frame`(x, , retained, drop = FALSE) : undefined columns selected
I am learning the package "caret", after I do the "rfe" function, I get the error ,as follows: Error in `[.data.frame`(x, , retained, drop = FALSE) : undefined columns selected In addition: Warning message: In predict.lm(object, x) : prediction from a rank-deficient fit may be misleading I try to that manual example, that is good, my data is wrong. I do not know what
2017 Jun 29
3
Help : glm p-values for a factor predictor
Hello, i am a newby on R and i am trying to make a backward selection on a binomial-logit glm on a large dataset (69000 lines for 145 predictors). After 3 days working, the stepAIC function did not terminate. I do not know if that is normal but i would like to try computing a "homemade" backward with a repeated glm ; at each step, the predictor with the max pvalue would be
2005 Apr 14
1
predict.glm(..., type="response") loses names (was RE: [R] A sugg estion for predict function(s))
> From: Ross Darnell > > Liaw, Andy wrote: > >>From: Liaw, Andy > >> > >> > >>>From: Ross Darnell > >>> > >>>A good point but what is the value of storing a large set of > >>>predicted > >>>values when the values of the explanatory variables are lost > >>>(predicted >
2011 Dec 30
1
Fwd: Re: Poisson GLM using non-integer response/predictors?
Hi, Use offset variables if count occurrences of an event and you want to model the observation time. glm(count ~ predictors + offset(log(observation_time)), family=poisson) If you want to compare durations, look at library(survival), ?coxph If tnoise_sqrt is the square root of tourist noise, your example seems incorrect, because it is a predictor, not the dependent variable tnoise_sqrt ~