similar to: strangeness in Predict() {rms}

Displaying 20 results from an estimated 1000 matches similar to: "strangeness in Predict() {rms}"

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'
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
2009 Oct 26
1
Unable to get Legend with survplot rms package
Hello, I apologize for the post as I am certainly overlooking a simple solution to my difficulties with getting a legend to print on a survplot from the rms package. I am plotting the following: survplot(survest(fita), n.risk=T, conf='none', cex.n.risk=.85, dots=T, col='gray10', lty=2) survplot(survest(fit), n.risk=F, conf='none', add=T) survplot(survest(fitb), n.risk=F,
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 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,
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
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
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
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")) >
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)
2009 Nov 14
1
setting contrasts for a logistic regression
Hi everyone, I'm doing a logistic regression with an ordinal variable. I'd like to set the contrasts on the ordinal variable. However, when I set the contrasts, they work for ordinary linear regression (lm), but not logistic regression (lrm): ddist = datadist(bin.time, exp.loc) options(datadist='ddist') contrasts(exp.loc) = contr.treatment(3, base = 3, contrasts = TRUE) lrm.loc =
2007 Mar 21
1
how to get "lsmeans"?
Dear all, I search the mail list about this topic and learn that no simple way is available to get "lsmeans" in R as in SAS. Dr.John Fox and Dr.Frank E Harrell have given very useful information about "lsmeans" topic. Dr. Frank E Harrell suggests not to think about lsmeans, just to think about what predicted values wanted and to use the predict
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 <-
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
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
2010 Oct 04
0
2010年10月4日 19:14:45 自动保存草稿
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
2010 Oct 04
0
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) : ???????????(the length of the augment was different)) i hope you tell me where is the mistake,and maybe i have chosen the
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