Displaying 20 results from an estimated 6000 matches similar to: "setting contrasts for a logistic regression"
2010 Oct 04
2
i have aproblem --thank you
dear professor:
thank you for your help,witn your help i develop the nomogram successfully.
after that i want to do the internal validation to the model.i ues the bootpred to do it,and then i encounter problem again,just like that.(´íÎóÓÚerror to :complete.cases(x, y, wt) : ²»ÊÇËùÓеIJÎÊý¶¼Ò»Ñù³¤(the length of the augment was different))
i hope you tell me where is the mistake,and maybe i have
2011 Jun 23
2
Rms package - problems with fit.mult.impute
Hi!
Does anyone know how to do the test for goodness of fit of a logistic model (in rms package) after running fit.mult.impute?
I am using the rms and Hmisc packages to do a multiple imputation followed by a logistic regression model using lrm.
Everything works fine until I try to run the test for goodness of fit: residuals(type=c("gof"))
One needs to specify y=T and x=T in the fit. But
2011 Apr 12
1
Datadist error
Dear all,
I have performed a simple logistic regression using the lrm function from
the Design library. Now I want to plot the summary, or make a nomogram. I
keep getting a datadist error: options(datadist= m.full ) not created with
datadist.
I have tried to specify datadist beforhand (although I don't know why it
should be done):
ddist<-datadist(d) ##where d is my dataset
2010 Oct 04
1
I have aproblem about nomogram--thank you for your help
dear professor:
I have a problem about the nomogram.I have got the result through analysing the dataset "exp2.sav" through multinominal logistic regression by SPSS 17.0.
and I want to deveop the nomogram through R-Projject,just like this :
> n<-100
> set.seed(10)
> T.Grade<-factor(0:3,labels=c("G0", "G1", "G2","G3"))
>
2013 Jun 24
2
Nomogram (rms) for model with shrunk coefficients
Dear R-users,
I have used the nomogram function from the rms package for a logistic
regresison model made with lrm(). Everything works perfectly (r version
2.15.1 on a mac). My question is this: if my final model is not the one
created by lrm, but I internally validated the model and 'shrunk' the
regression coefficients and computed a new intercept, how can I build a
nomogram using that
2010 Jul 31
3
I have a problem
dear£º
in the example£¨nomogram£©£¬I don't understand the meanings of the program which have been marked by red line.And how to compile the program(L <- .4*(sex=='male') + .045*(age-50) +
(log(cholesterol - 10)-5.2)*(-2*(sex=='female') + 2*(sex=='male'))).
n <- 1000 # define sample size
set.seed(17) # so can reproduce the results
age <- rnorm(n, 50, 10)
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 <-
2018 Jan 03
1
summary.rms help
Dear All,
using the example from the help of summary.rms
library(rms)
n <- 1000 # define sample size
set.seed(17) # so can reproduce the results
age <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120, 15)
cholesterol <- rnorm(n, 200, 25)
sex <- factor(sample(c('female','male'), n,TRUE))
label(age) <- 'Age'
2003 Nov 04
2
help with nomogram function
I have fitted a logistic regression model
> failed.lr2$call
lrm(formula = failed ~ Age + task2 + Age:task2, data = time.long,
na.action = na.omit)
using the Design package functions and would like to generate a
nomogram from this model.
the datadist information is generated and stored in
> ddist
time.long$Age time.long$task2
Low:effect 45
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
2008 May 29
2
Troubles plotting lrm output in Design Library
Dear R-helpers,
I'm having a problem in using plot.design in Design Library. Tho
following example code produce the error:
> n <- 1000 # define sample size
> set.seed(17) # so can reproduce the results
> age <- rnorm(n, 50, 10)
> blood.pressure <- rnorm(n, 120, 15)
> cholesterol <- rnorm(n, 200, 25)
> sex <-
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 Aug 14
1
How to add lines to lattice plot produced by rms::bplot
I have a plot produced by function bplot (package = rms) that is
really a lattice plot (class="trellis"). It is similar to this plot
produced by a very minor modification of the first example on the
bplot help page:
requiere(rms)
n <- 1000 # define sample size
set.seed(17) # so can reproduce the results
age <- rnorm(n, 50, 10)
blood.pressure <- rnorm(n, 120,
2002 Sep 13
1
design package (plot problems)
Hi,
just making some experiments with
design library i get an error if
i want plot(fit) - show below from
onlineHelp !?
..perhaps is here another mask problem?, but
label from xtable which was my first problem
is now off !
Thanks for advance & regards,
Christian
$ n <- 1000 # define sample size
$ set.seed(17) # so can reproduce the results
$ age <- rnorm(n, 50, 10)
2005 Aug 22
1
How to add legend of plot.Design function (method=image)? (if (!.R.) )
Hi,
When running
z <- plot(fit, age=NA, cholesterol=NA, perim=boundaries, method='image')
Legend(z, fun=plogis, at=qlogis(c(.01,.05,.1,.2,.3,.4,.5)),
zlab='Probability')
And after pointing the cursor to the plot() screen in R, I obtain the
following message:
Using function "locator(2)" to place opposite corners of image.legend
Error in
2011 May 18
1
logistic regression lrm() output
Hi, I am trying to run a simple logistic regression using lrm() to calculate a
odds ratio. I found a confusing output when I use summary() on the fit object
which gave some OR that is totally different from simply taking
exp(coefficient), see below:
> dat<-read.table("dat.txt",sep='\t',header=T,row.names=NULL)
> d<-datadist(dat)
> options(datadist='d')
2010 Oct 06
2
A problem --thank you
dear:teacher
i have a problem which about the polr()(package "MASS"), if the response must have 3 or more levels?
and how to fit the polr() to 2 levels?
thank you.
turly yours
[[alternative HTML version deleted]]
2010 Feb 17
1
strangeness in Predict() {rms}
Hi,
Running the following example from ?Predict() throws an error I have never
seen before:
set.seed(1)
x1 <- runif(300)
x2 <- runif(300)
ddist <- datadist(x1,x2); options(datadist='ddist')
y <- exp(x1+ x2 - 1 + rnorm(300))
f <- ols(log(y) ~ pol(x1,2) + x2)
p1 <- Predict(f, x1=., conf.type='mean')
Error in paste(nmc[i], "=", if (is.numeric(x))
2011 Aug 06
1
help with predict for cr model using rms package
Dear list,
I'm currently trying to use the rms package to get predicted ordinal
responses from a conditional ratio model. As you will see below, my
model seems to fit well to the data, however, I'm having trouble
getting predicted mean (or fitted) ordinal response values using the
predict function. I have a feeling I'm missing something simple,
however I haven't been able to
2005 Mar 10
2
Logistic regression goodness of fit tests
I was unsure of what suitable goodness-of-fit tests existed in R for logistic regression. After searching the R-help archive I found that using the Design models and resid, could be used to calculate this as follows:
d <- datadist(mydataframe)
options(datadist = 'd')
fit <- lrm(response ~ predictor1 + predictor2..., data=mydataframe, x =T, y=T)
resid(fit, 'gof').
I set up a