Displaying 20 results from an estimated 7000 matches similar to: "Many warnings in the newest R ..."
2013 Apr 19
2
NAMESPACE and imports
I am cleaning up the rms package to not export functions not to be called
directly by users. rms uses generic functions defined in other packages.
For example there is a latex method in the Hmisc package, and rms has a
latex method for objects of class "anova.rms" so there are anova.rms and
latex.anova.rms functions in rms. I use:
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
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 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
2009 Sep 08
2
Very basic question regarding plot.Design...
Hello ALL!
I have a problem to plot factor (lets say gender) as a line, or at least
both line and point, from ols model:
ols1 <- ols(Y ~ gender, data=dat, x=T, y=T)
plot(ols1, gender=NA, xlab="gender", ylab="Y",
ylim=c(5,30), conf.int=FALSE)
If I convert gender into discrete numeric predictor, and use
forceLines=TRUE, plot is not nice and true, since it shows values
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 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 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
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')
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
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
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
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
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
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]]
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
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 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
2011 Aug 06
1
help with predict for cr model using rms package
Dear list,
I'm currently trying to use the rms package to get predicted ordinal
responses from a conditional ratio model. As you will see below, my
model seems to fit well to the data, however, I'm having trouble
getting predicted mean (or fitted) ordinal response values using the
predict function. I have a feeling I'm missing something simple,
however I haven't been able to
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