Displaying 20 results from an estimated 5000 matches similar to: "djustment values not defined"
2012 May 27
2
Unable to fit model using “lrm.fit”
Hi,
I am running a logistic regression model using lrm library and I get the
following error when I run the command:
mod1 <- lrm(death ~ factor(score), x=T, y=T, data = env1)
Unable to fit model using ?lrm.fit?
where score is a numeric variable from 0 to 6.
LRM executes fine for the following commands:
mod1 <- lrm(death ~ score, x=T, y=T, data = env1)
mod1<- lrm(death ~
2009 Apr 28
8
duplicate 'row.names' are not allowed
Hi everyone,
I have got the following problem:
x1 <- rnorm(10,5,1)
x2 <- runif(10,0,1)
nam1 <- paste("A",1:4,sep=".")
nam2 <- paste("A",6:9,sep=".")
nam <- c(nam1,"A.4",nam2,"A.9")
mydata <- data.frame(x1,x2)
rownames(mydata) <- nam
Error in `row.names<-.data.frame`(`*tmp*`, value = c("A.1",
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
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
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 =
2009 Jun 08
5
mean
Hi,
I have gote the following data
x1 <- c(rep(1,6),rep(4,7),rep(6,10))
x2 <- rnorm(length(x1),6,1)
data <- data.frame(x1,x2)
and I would like to compute the mean of the x2 for each individual of x1, i. e. x1=1,4 and 6?
Thank you very much in advance,
Amori
[[alternative HTML version deleted]]
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 <-
2009 Jul 23
3
Counter
Hi everyone,
Is there any counter function in R for the following purpose:
x <- matrix(c(1,1,0,2,1,0,0,2,0,1,2,1,2,1,0,1),nrow=4)
As I would like to know how many zeros, ones, and twos in each row of x?
Many thank in advance,
Amor
[[alternative HTML version deleted]]
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
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
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')
2012 Jul 31
2
phantom NA/NaN/Inf in foreign function call (or something altogether different?)
Dear experts,
Please forgive the puzzled title and the length of this message - I
thought it would be best to be as complete as possible and to show the
avenues I have explored.
I'm trying to fit a linear model to data with a binary dependent
variable (i.e. Target.ACC: accuracy of response) using lrm, and
thought I would start from the most complex model (of which
"sample1.lrm1" is
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
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
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 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])
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
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