similar to: datadist() in Design library

Displaying 20 results from an estimated 2000 matches similar to: "datadist() in Design library"

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 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) +
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
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
2009 Jun 17
2
djustment values not defined
Hello,   I am using mod1 <- lrm(y~x1+x2,na.action=na.pass,method="lrm.fit") summary(mod1) and I've got the following error: Error in summary.Design(mod1) : adjustment values not defined here or with datadist for x1 x2   Many thank, Amor [[alternative HTML version deleted]]
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 <-
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")) >
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
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 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 =
2006 Feb 08
2
Logistic regression - confidence intervals
Please forgive a rather na??ve question... Could someone please give a quick explanation for the differences in conf intervals achieved via confint.glm (based on profile liklihoods) and the intervals achieved using the Design library. For example, the intervals in the following two outputs are different. library(Design) x = rnorm(100) y = gl(2,50) d = data.frame(x = x, y = y) dd = datadist(d);
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)
2005 Aug 22
1
How to add values on the axes of the 3D bi-variable lrm fit?
Dear r-list, When I try to plot the following 3D lrm fit I obtain only arrows with labels on the three axes of the figure (without values). fit <- lrm(y ~ rcs(x1,knots)+rcs(x2,knots), tol=1e-14,X=T,Y=T) dd <- datadist(x1,x2);options(datadist='dd'); par(mfrow=c(1,1)) plot(fit,x1=NA, x2=NA, theta=50,phi=25) How can I add values to the axes of this plot? (axes with the
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')
2011 May 05
7
Draw a nomogram after glm
Hi all R users I did a logistic regression with my binary variable Y (0/1) and 2 explanatory variables. Now I try to draw my nomogram with predictive value. I visited the help of R but I have problem to understand well the example. When I use glm fonction, I have a problem, thus I use lrm. My code is: modele<-lrm(Y~L+P,data=donnee) fun<- function(x) plogis(x-modele$coef[1]+modele$coef[2])
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
2008 Apr 03
1
Design package lrm summary and factors
Hello, I have question regarding the lrm function and estimating the odds ratio between different levels of a factored variable. The following code example illustrates the problem I am having. I have a data set with an outcome variable (0,1) and an input variable (A,B,C). I would like to estimate the effect of C vs B, but when I perform the summary I only get A vs B and A vs C, even though I
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
2004 Jan 29
2
Calculating/understanding variance-covariance matrix of logistic regression (lrm $var)
Hallo! I want to understand / recalculate what is done to get the CI of the logistic regression evaluated with lrm. As far as I came back, my problem is the variance-covariance matrix fit$var of the fit (fit<-lrm(...), fit$var). Here what I found and where I stucked: ----------------- library(Design) # data D<-c(rep("a", 20), rep("b", 20)) V<-0.25*(1:40) V[1]<-25