similar to: fitting non-intercept model with lrm

Displaying 20 results from an estimated 30000 matches similar to: "fitting non-intercept model with lrm"

2012 May 27
2
Unable to fit model using “lrm.fit”
Hi, I am running a logistic regression model using lrm library and I get the following error when I run the command: mod1 <- lrm(death ~ factor(score), x=T, y=T, data = env1) Unable to fit model using ?lrm.fit? where score is a numeric variable from 0 to 6. LRM executes fine for the following commands: mod1 <- lrm(death ~ score, x=T, y=T, data = env1) mod1<- lrm(death ~
2017 Sep 14
3
Help understanding why glm and lrm.fit runs with my data, but lrm does not
Dear all, I am using the publically available GustoW dataset. The exact version I am using is available here: https://drive.google.com/open?id=0B4oZ2TQA0PAoUm85UzBFNjZ0Ulk I would like to produce a nomogram for 5 covariates - AGE, HYP, KILLIP, HRT and ANT. I have successfully fitted a logistic regression model using the "glm" function as shown below. library(rms) gusto <-
2017 Sep 14
0
Help understanding why glm and lrm.fit runs with my data, but lrm does not
> On Sep 14, 2017, at 12:30 AM, Bonnett, Laura <L.J.Bonnett at liverpool.ac.uk> wrote: > > Dear all, > > I am using the publically available GustoW dataset. The exact version I am using is available here: https://drive.google.com/open?id=0B4oZ2TQA0PAoUm85UzBFNjZ0Ulk > > I would like to produce a nomogram for 5 covariates - AGE, HYP, KILLIP, HRT and ANT. I have
2017 Sep 14
1
Help understanding why glm and lrm.fit runs with my data, but lrm does not
Fixed 'maxiter' in the help file. Thanks. Please give the original source of that dataset. That dataset is a tiny sample of GUSTO-I and not large enough to fit this model very reliably. A nomogram using the full dataset (not publicly available to my knowledge) is already available in http://biostat.mc.vanderbilt.edu/tmp/bbr.pdf Use lrm, not lrm.fit for this. Adding maxit=20 will
2010 Dec 25
2
predict.lrm vs. predict.glm (with newdata)
Hi all I have run into a case where I don't understand why predict.lrm and predict.glm don't yield the same results. My data look like this: set.seed(1) library(Design); ilogit <- function(x) { 1/(1+exp(-x)) } ORDER <- factor(sample(c("mc-sc", "sc-mc"), 403, TRUE)) CONJ <- factor(sample(c("als", "bevor", "nachdem",
2010 Jun 18
1
Fitting a polynomial using lrm from the Design library
Hi all, I am looking to fit a logistic regression using the lrm function from the Design library. I am interested in this function because I would like to obtain "pseudo-R2" values (see http://tolstoy.newcastle.edu.au/R/help/02b/1011.html). Can anyone help me with the syntax? If I fit the model using the stats library, the code looks like this: model <- glm(x$trait ~ x$PC1 +
2005 Jul 12
1
Design: predict.lrm does not recognise lrm.fit object
Hello I'm using logistic regression from the Design library (lrm), then fastbw to undertake a backward selection and create a reduced model, before trying to make predictions against an independent set of data using predict.lrm with the reduced model. I wouldn't normally use this method, but I'm contrasting the results with an AIC/MMI approach. The script contains: # Determine full
2002 Oct 24
2
glm and lrm disagree with zero table cells
I've noticed that glm and lrm give extremely different results if you attempt to fit a saturated model to a dataset with zero cells. Consider, for instance the data from, Agresti's Death Penalty example [0]. The crosstab table is: , , PENALTY = NO VIC DEF BLACK WHITE BLACK 97 52 WHITE 9 132 , , PENALTY = YES VIC DEF BLACK WHITE BLACK 6 11
2008 Oct 09
2
Singular information matrix in lrm.fit
Hi R helpers, I'm fitting large number of single factor logistic regression models as a way to immediatly discard factor which are insignificant. Everything works fine expect that for some factors I get error message "Singular information matrix in lrm.fit" which breaks whole execution loop... how to make LRM not to throw this error and simply skip factors with singularity
2008 Mar 03
1
using 'lrm' for logistic regression
Hi R, I am getting this error while trying to use 'lrm' function with nine independent variables: > res = lrm(y1994~WC08301+WC08376+WC08316+WC08311+WC01001+WC08221+WC08106+WC0810 1+WC08231,data=y) singular information matrix in lrm.fit (rank= 8 ). Offending variable(s): WC08101 WC08221 Error in j:(j + params[i] - 1) : NA/NaN argument Now, if I take choose only four
2010 Aug 11
3
extracting the standard error in lrm
Hi, I would like to extract the coefficients of a logistic regression (estimates and standard error as well) in lrm as in glm with summary(fit.glm)$coef Thanks David
2009 Oct 25
1
Getting AIC from lrm in Design package
I am trying to obtain the AICc after performing logistic regression using the Design package. For simplicity, I'll talk about the AIC. I tried building a model with lrm, and then calculating the AIC as follows: likelihood.ratio <- unname(lrm(succeeded~var1+var2,data=scenario,x=T,y=T)$stats["Model L.R."]) #Model likelihood ratio??? model.params <- 2 #Num params in my model AIC
2008 Apr 01
1
lrm -interaction without main effect-error message
Dear all, this might be not only an R-question but also a statistical. When I do a logistic regression analysis (species distribution modeling) with function lrm (Design package) I get the follwoing error message: > tadl1<-lrm(triad~fd+dista+fd2+dista2+fd:dista+dista:geo2, x=T, y=T) Error in if (!length(fname) || !any(fname == zname)) { : missing value where TRUE/FALSE needed The
2004 Jan 29
2
Calculating/understanding variance-covariance matrix of logistic regression (lrm $var)
Hallo! I want to understand / recalculate what is done to get the CI of the logistic regression evaluated with lrm. As far as I came back, my problem is the variance-covariance matrix fit$var of the fit (fit<-lrm(...), fit$var). Here what I found and where I stucked: ----------------- library(Design) # data D<-c(rep("a", 20), rep("b", 20)) V<-0.25*(1:40) V[1]<-25
2005 Apr 15
2
negetative AIC values: How to compare models with negative AIC's
Dear, When fitting the following model knots <- 5 lrm.NDWI <- lrm(m.arson ~ rcs(NDWI,knots) I obtain the following result: Logistic Regression Model lrm(formula = m.arson ~ rcs(NDWI, knots)) Frequencies of Responses 0 1 666 35 Obs Max Deriv Model L.R. d.f. P C Dxy Gamma Tau-a R2 Brier 701 5e-07 34.49
2009 Aug 29
3
lrm in Design
Hello everybody, I am trying to do a logistic regression model with lrm() from the design package. I am comparing to groups with different medical outcome which can either be "good" or "bad". In the help file it says that lrm codes al responses to 0,1,2,3, etc. internally and does so in alphabetical order. I would guess this means bad=0 and good=1. My question: I am trying to
2009 Aug 21
1
Possible bug with lrm.fit in Design Library
Hi, I've come across a strange error when using the lrm.fit function and the subsequent predict function. The model is created very quickly and can be verified by printing it on the console. Everything looks good. (In fact, the performance measures are rather nice.) Then, I want to use the model to predict some values. I get the following error: "fit was not created by a Design
2008 Jun 30
2
difference between MASS::polr() and Design::lrm()
Dear all, It appears that MASS::polr() and Design::lrm() return the same point estimates but different st.errs when fitting proportional odds models, grade<-c(4,4,2,4,3,2,3,1,3,3,2,2,3,3,2,4,2,4,5,2,1,4,1,2,5,3,4,2,2,1) score<-c(525,533,545,582,581,576,572,609,559,543,576,525,574,582,574,471,595, 557,557,584,599,517,649,584,463,591,488,563,553,549) library(MASS) library(Design)
2009 Aug 21
1
Repost - Possible bug with lrm.fit in Design Library
Hi, I've come across a strange error when using the lrm.fit function and the subsequent predict function. The model is created very quickly and can be verified by printing it on the console. Everything looks good. (In fact, the performance measures are rather nice.) Then, I want to use the model to predict some values. I get the following error: "fit was not created by a Design
2006 Jun 16
6
modeling logit(y/n) using lrm
I have a dataset at a hospital level (as opposed to the patient level) that contains number of patients experiencing events (call this number y), and the number of patients eligible for such events (call this number n). I am trying to model logit(y/n) = XBeta. In SAS this can be done in PROC LOGISTIC or GENMOD with a model statement such as: model y/n = <predictors>;. Can this be done