Displaying 20 results from an estimated 10000 matches similar to: "Getting AIC from lrm in Design package"
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
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 ~
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
2009 Jun 23
1
How to assign fixed beta coefficients in lrm for external validation
Hi,
I am planning to externally validate a logistic prediction model in a new
cohort. Outcome is mortality. The betacoefficients were derived from a
previous published article. It seems not possible in R to assign fixed beta
coefficients to predictors like lrm (death ~
intercept+beta1*var1+beta2*var2...). How do i solve this problem?
Thank you in advance.
Joey L
--
View this message in context:
2004 Sep 30
1
polr (MASS) and lrm (Design) differences in tests of statistical signifcance
Greetings:
I'm running R-1.9.1 on Fedora Core 2 Linux.
I tested a proportional odds logistic regression with MASS's polr and
Design's lrm. Parameter estimates between the 2 are consistent, but the
standard errors are quite different, and the conclusions from the t and
Wald tests are dramatically different. I cranked the "abstol" argument
up quite a bit in the polr
2008 Jan 25
2
'Best penalty' in design package
Dear Users,
In case of ridge logistic regression, i want to calculate the optimum
penalty using aic and bic criteria. Here is the sample code:
fit <- lrm(RES ~CAT01+NUM01+NUM02+CAT02+CAT03+CAT04+NUM03+CAT05+CAT06+NUM04+
CAT07+CAT08+NUM05+NUM06, data = train.data, x = TRUE, y = TRUE)
pentrace(fit, penalty = list(seq(.001, 5, by=.1)))
output:
Best penalty:
penalty df
1.001
2007 Mar 14
0
aic for lrm
I cannot seem to get the aic or extractaic call to work with multinomial
logistic regression models.
Here is what I am doing:
library('Design')
lrm1<-lrm(r1~p1)
#where p1 is multinomial and r1 is binomial
library('MASS')
aic(lrm1)
Error in if (fam %in% c("gaussian", "Gamma", "inverse.gaussian")) p <- p +
:
argument is of length zero
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 Apr 28
1
error in summary.Design
Dear list,
after fitting an lrm with the Design package (stored as "mymodel") I
try running a summary, but I get the following error:
dim(mydata)
[1] 235 9
names(mydata)
[1] "id" "VAR1" "VAR2" "VAR3" "VAR4" "VAR5" "VAR6" "VAR7" "VAR8"
summary(mymodel)
Error in `contrasts<-`(`*tmp*`,
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
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
2011 May 15
5
Question on approximations of full logistic regression model
Hi,
I am trying to construct a logistic regression model from my data (104
patients and 25 events). I build a full model consisting of five
predictors with the use of penalization by rms package (lrm, pentrace
etc) because of events per variable issue. Then, I tried to approximate
the full model by step-down technique predicting L from all of the
componet variables using ordinary least squares
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 Sep 04
2
lrm in Design package--missing value where TRUE/FALSE needed
Hi,
A error message arose while I was trying to fit a ordinal model with lrm() I am using R 2.8 with Design package.
Here is a small set of mydata:
RC RS Sex CovA CovB CovC CovD CovE
2 1 0 1 1 0 -0.005575280 2
2 1 0 1 0 1 -0.001959580 2
3 0 0 0 1 0 -0.004725880 2
0 0 0 1 0 0 -0.005504850 2
2 1 1 0 0 0 -0.003880170 1
2 1 0 0 1 0 -0.006074230 2
2 1 0 0 1 1 -0.003963920 2
2 1 0 0 1 0
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
2009 Sep 26
1
Summary/Bootstrap for Design library's lrm function
Can anyone tell me what I might be doing incorrectly for an ordinal
logistic regression for lrm?
I cannot get R(2.9.1)to run either summary nor will it let me bootstrp to
validate.
### Y is a 5 value measure with a range from 1-5, the independent
variables are the same. N=75 but when we knock out the NAs it comes down
to 51####
> lrm(formula = Y ~ permemp + rev + gconec + scorpstat, data =
2008 Dec 13
2
Obtaining p-values for coefficients from LRM function (package Design) - plaintext
Sent this mail in rich text format before. Excuse me for this.
------------------------
Dear all,
I'm using the lrm function from the package "Design", and I want to
extract the p-values from the results of that function. Given an lrm
object constructed as follows :
fit <- lrm(Y~(X1+X2+X3+X4+X5+X6+X7)^2, data=dataset)
I need the p-values for the coefficients printed by calling
2010 Oct 05
4
Extract summary stats to table
Dear List,
I am looking to run a host of models (60) with three methods - lmer,glm and lrm.
Is there a way to output the key stats into a table that i can copy to excel?
I.e for lmer i would want AIC,BIC etc
for lrm i would want Brier score, r2, c-value etc
At present i am running the models from a script and then copying across the values into a excel spreadsheet however this is time
2006 Oct 02
2
Help with lrm function in package Design
Hi, there,
I am having trouble using 'lrm' function in package 'Design'. Basically,
the ' . ' after ' ~ ' wouldn't work. Here are some sample codes:
> temp <-
data.frame(a=c(rep(0,3),rep(1,3)),b=rnorm(6),c=c('a','b','c','a','b','c'))
> lrm(a~.,data=temp)
Error in terms.formula(formula, specials =
2005 May 02
2
Restricted cubic spline function ERROR?: glm(Y~rcs(x,5))
Dear all,
Is the restricted cubic spline function working properly in the glm model?
We used glm(y~rcs(x,5), family=binomial) but it seems that for some
theoretical reasons the rcs, restricted cubic spline function can not be
fitted by a glm function. Is this correct?
Regards,
Jan
((Originally, we used lrm(y~ rcs(x,5)) but we couldn't find how to derive
the AIC value of the fitted model.