Displaying 20 results from an estimated 4000 matches similar to: "Help with lrm function in package Design"
2004 Jul 16
3
rpart and TREE, can be the same?
Hi, all,
I am wondering if it is possible to set parameters of 'rpart' and 'tree'
such that they will produce the exact same tree? Thanks.
Auston Wei
Statistical Analyst
Department of Biostatistics and Applied Mathematics
The University of Texas MD Anderson Cancer Center
Tel: 713-563-4281
Email: wwei@mdanderson.org
[[alternative HTML version deleted]]
2006 Mar 10
1
error message in cph
Hi, List,
I am using function 'cph' in package 'Design'. I have run into this error
message but could not find documentation after looking for a long time.
Could someone help me out? What kind of problem it is in my data set and
how to fix it?
Thanks a lot!
Auston
Error in fitter(X, Y, strata = Strata, offset = offset, weights = weights,
:NA/NaN/Inf in foreign function
2005 Sep 20
2
why this postscript didn't work?
Hi, List,
I used the following codes to generate ps plots but foo.ps contains
nothing. Would someone please point out what is wrong with my codes?
Thanks a million!
postscript('foo.ps')
par(mfrow=c(2,1))
par(mfg=c(1,1))
hist(rnorm(100),col='blue')
par(mfrow=c(2,2))
par(mfg=c(2,1))
hist(rnorm(50),col='blue')
par(mfg=c(2,2))
hist(rnorm(60),col='blue')
dev.off()
2006 Oct 02
1
a question regarding 'lrm'
Hi List,
I don't understand why 'lrm' doesn't recognize the '~.' formula. I'm pretty sure it was working before. Please see below:
I'm using R2.3.0, WinXP, Design 2.0-12
thanks,
...Tao
> dat <- data.frame(y=factor(rep(1:2,each=50)), x1=rnorm(100), x2=rnorm(100), x3=rnorm(100))
> lrm(y~., data=dat, x=T, y=T)
Error in terms.formula(formula, specials =
2004 Oct 04
2
how to change data type in data frame?
Hi, list,
suppose i have such a data frame:
trash <-
data.frame(cbind(seq(1:5),c('a','a','b','a','b'),c('b','a','b','b','a')))
names(trash) <- c('age','typeI','typeII')
and I want to change all 'a's to be 0 and 'b's to be 1.
temp <- as.matrix(trash)
2007 Jul 03
1
Formula syntax question
Forgive me if this is obvious:
I have a frame of data with the variables in each column (e.g.
Discrete_Variable1, ContinuousVariable_1, ContinuousVariable_2, ...
ContinuousVariable_n)
and I want to create a model using lrm i.e.
model <- lrm(Discrete_Variable1 ~ ContinuousVariable_1,
data=lotsofdata)
Is there a syntax for having all the continuous variables referenced
in the
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
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
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",
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
2004 Mar 22
2
Handling of NAs in functions lrm and robcov
Hi R-helpers
I have a dataframe DF (lets say with the variables, y, x1, x2, x3, ...,
clust) containing relatively many NAs.
When I fit an ordinal regression model with the function lrm from the
Design library:
model.lrm <- lrm(y ~ x1 + x2, data=DF, x=TRUE, y=TRUE)
it will by default delete missing values in the variables y, x1, x2.
Based on model.lrm, I want to apply the robust covariance
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 ~
2013 Apr 19
2
NAMESPACE and imports
I am cleaning up the rms package to not export functions not to be called
directly by users. rms uses generic functions defined in other packages.
For example there is a latex method in the Hmisc package, and rms has a
latex method for objects of class "anova.rms" so there are anova.rms and
latex.anova.rms functions in rms. I use:
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 <-
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
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 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
2006 Nov 14
1
Using lrm
Hi,
I have to build a logistic regression model on a data set that I have. I
have three input variables (x1, x2, x3) and one output variable (y).
The syntax of lrm function looks like this
lrm(formula, data, subset, na.action=na.delete, method="lrm.fit",
model=FALSE, x=FALSE, y=FALSE, linear.predictors=TRUE, se.fit=FALSE,
penalty=0, penalty.matrix, tol=1e-7,
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 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