similar to: Re: [S] using Hmisc and Design library

Displaying 20 results from an estimated 1100 matches similar to: "Re: [S] using Hmisc and Design library"

2004 Dec 15
2
using Hmisc and Design library
Hi, I encountered a weird problem when using the Design and Hmisc problem. I have 2 data frame called "a" and "b", both have 3 columns: "time", "status" and "scores", a sample of the data frame is like: data frame "a": time status scores 1 21 1 99.61 2 38 0 101.11 3 51 0 100.62 4 48 0 87.52 5 78 0
2006 Apr 11
1
cph() in Design package
Hi there, I encountered a weird problem using cph() with Design package: I have 2 datasets, say "dat1" and "dat2", both data frames with 3 columns "time","status" and "scores", all numeric If I run the following: dd<-datadist(dat1) options(datadist='dd') dd time status scores Low:effect 37.0 0 -6.018
2003 Jan 20
2
Adding reference lines to xyplot
I'm trying to add a set of reference lines to a multipanel xyplot xyplot(y ~ x | Visit, panel = function(x, y, ...){ panel.xyplot(x, y, ...) abline(v = c(0.5, 1)) }) However, the reference lines are different for different visits. For example, for the first 2 visits, I'd like vertical lines at x = 0.5 and 1. For visits 3 and four, I'd like vertical lines at x = 1 and 1.5. I can
2010 May 05
1
Error messages with psm and not cph in Hmisc
While sm4.6ll<-fit.mult.impute(Surv(agesi, si)~partner+ in.love+ pubty+ FPA+ strat(gender),fitter = cph, xtrans = dated.sexrisk2.i, data = dated.sexrisk2, x=T,y=T,surv=T, time.inc=16) runs perfectly using Hmisc, Design and mice under R11 run via Sciviews-K, with library(Design) library(mice) ds2d<-datadist(dated.sexrisk2) options(datadist="ds2d")
2001 Jul 28
2
Re: [S] Labels wrong with lrm
Dear Jan, Thank you very much for your excellent description of the problem and the self-contained test code. This is a problem that I've been meaning to either document better or solve for some time. The root of the problem is with the builtin S-Plus terms.inner function: > attr(terms.inner(asthma ~ pol(age,kx) + smok),'variables') expression(age, kx, smok) You can see that
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
2008 Mar 18
0
Trouble fitting models with nonNULL datadist in Design Library
Having trouble with datadist in the Design library. When I set the datadist option, all of the fitting functions give error messages similar to "Error in exists(x, envir, mode, inherits) : invalid first argument". Code below was run in R version 2.5.0 under windows, but get similar results with R version 6.2, except with additional problem that it will not fit model with
2006 May 20
2
Function as.Date leading to error implying that strptime requires 3 arguments
I'm using R V 2.2.1. When I try an example from the as.Date help page, I get an error. > x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960") > z <- as.Date(x, "%d%b%Y") Error in strptime(x, format) : 2 arguments passed to 'strptime' which requires 3 > Any suggestions would be appreciated. Thanks, Rob
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) +
2009 Jul 09
2
datadist() in Design library
Hi I got an error message using datadist() from Design package: > library(Design,T) > dd <- datadist(beta.final) > options(datadist="dd") > lrm(Disease ~ gsct+apcct+rarct, x=TRUE, y=TRUE) Error in eval(expr, envir, enclos) : object "Disease" not found All variables inclduing response variable "Disease" are in the data frame
2009 Apr 29
1
Error with Design.Function(fit)
Hi all, I'm reposting this with a more appropriate subject. Do I need to define limits as the error message seems to suggest? If so, how? The error message, my code, the output and the first few lines of my data are all below. Thank you! "Error in Getlim(at, allow.null = TRUE, need.all = TRUE) : variable dmodel.df does not have limits defined in fit or with datadist" My code:
2007 Jul 25
2
Subscript out of bounds when using datadist() from Design library
I am running R version 2.4.1 on Windows XP. I have a question regarding the datadist() function from the Design library. I have a data.frame (call it my.data) with 4 columns. When I submit the code datadist(data=my.data) I get the following error message: Error in X[[1]] : subscript out of bounds I suspect there may be something wrong with my data.frame (I'm certain there is nothing
2007 Oct 31
1
datadist options error, DESIGN library
Hello, using the Design library, and the following command (from the Harrell's book, example at Ch.20): dd <- datadist(rx, age, wt, pf, pf.coded, heart, map, hg, sz, sg, ap, bm) options(datadist=='dd') I get the following error: Error in datadist == "dd" : comparison (1) possible only for atomic data or list What does it means? thank you, giulia
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 <-
2009 Aug 21
1
applying summary() to an object created with ols()
Hello R-list, I am trying to calculate a ridge regression using first the *lm.ridge()* function from the MASS package and then applying the obtained Hoerl Kennard Baldwin (HKB) estimator as a penalty scalar to the *ols()* function provided by Frank Harrell in his Design package. It looks like this: > rrk1<-lm.ridge(lnbcpc ~ lntex + lnbeerp + lnwinep + lntemp + pop, subset(aa,
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
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
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
2007 Oct 02
1
Design package: plot summary
Hi everybody, I am a new user of R, design package. I am trying to plot the estimated hazard ratio's of my cox regression model with the confidence intervals. But I keep getting the message:Error in `contrasts<-`(`*tmp*`, value = "contr.treatment") : contrasts can be applied only to factors with 2 or more levels I have dichotomous, categorical as well as continuous