similar to: design package (plot problems)

Displaying 20 results from an estimated 3000 matches similar to: "design package (plot problems)"

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'
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 <-
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
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,
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)
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]]
2005 Aug 22
0
How to add legend of plot.Design function ( method=image)?
Dear Rlist, How can the Legend of the plot.Design() function can be visualized? Following the documentation in R, I did the following (see below), only the 'Legend' function doesn't visualize the legend of the plot (method='image') of the lrmfit. I tried to change par( margin setting) but this didn’t solve it. How can this be solved? Thanks a lot, Jan
2010 Jul 29
1
I need the dataset--thank you
dear: I am a user of R project.And now ,I have a problem. I want to know what is the name of the datasets in the web page--"Draw a Nomogram Representing a Regression Fit" which come from the R-home(http://www.r-project.org/ Package rms version 3.0-0). And can you supply the dataset to me? wish for your help,thank you!
2018 Feb 14
0
Unexpected behaviour in rms::lrtest
Hello. One of my teaching assistants was experimenting and encountered unexpected behaviour with the lrtest function in the rms package. It appears that when you have a pair of non-nested models that employ an RCS, the error checking for non-nested models appears not to work. Here is a reproducible example. > library(rms) Loading required package: Hmisc Loading required package: lattice
2009 Jul 17
1
c-index validation from Design library
Hi Group, I have a question about obtaining the bias-corrected c-index using validate from the Design library. As an example, consider the example from help page: library(Design) ?validate.lrm n <- 1000 age <- rnorm(n, 50, 10) blood.pressure <- rnorm(n, 120, 15) cholesterol <- rnorm(n, 200, 25) sex <- factor(sample(c('female','male'),
2010 Dec 09
1
Calculating odds ratios from logistic GAM model
Dear R-helpers I have a question related to logistic GAM models. Consider the following example: # Load package library(mgcv) # Simulation of dataset n <- 1000 set.seed(0) age <- rnorm(n, 50, 10) blood.pressure <- rnorm(n, 120, 15) cholesterol <- rnorm(n, 200, 25) sex <- factor(sample(c('female','male'), n,TRUE)) L <-
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")) >
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 =
2008 Apr 17
1
Error in Design package: dataset not found for options(datadist)
Hi, Design isn't strictly an R base package, but maybe someone can explain the following. When lrm is called within a function, it can't find the dataset dd: > library(Design) > age <- rnorm(30, 50, 10) > cholesterol <- rnorm(30, 200, 25) > ch <- cut2(cholesterol, g=5, levels.mean=TRUE) > fit <- function(ch, age) + { + d <- data.frame(ch, 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
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
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))