similar to: Repost - Possible bug with lrm.fit in Design Library

Displaying 20 results from an estimated 500 matches similar to: "Repost - Possible bug with lrm.fit in Design Library"

2009 Aug 21
1
Possible bug with lrm.fit in Design Library
Hi, I've come across a strange error when using the lrm.fit function and the subsequent predict function. The model is created very quickly and can be verified by printing it on the console. Everything looks good. (In fact, the performance measures are rather nice.) Then, I want to use the model to predict some values. I get the following error: "fit was not created by a Design
2005 Jul 12
1
Design: predict.lrm does not recognise lrm.fit object
Hello I'm using logistic regression from the Design library (lrm), then fastbw to undertake a backward selection and create a reduced model, before trying to make predictions against an independent set of data using predict.lrm with the reduced model. I wouldn't normally use this method, but I'm contrasting the results with an AIC/MMI approach. The script contains: # Determine full
2010 Feb 11
2
Question about rank() function
Hello, I am trying to get the 'rank' function to work for me, but not sure what I am doing wrong. Please help. I ran the following commands: data = read.table("test1.csv", head=T, as.is=T, na.string=".", row.nam=NULL) X1 = as.factor(data[[3]]) X2 = as.factor(data[[4]]) X3 = as.factor(data[[5]]) Y = data[[2]] model = lm(Y ~ X1*X2*X3, na.action = na.exclude) fmodel =
2010 May 19
0
Piecewise nls w/ boundary as a fitting parameter
Hello, Fitting a piecewise smooth curve to a set of points (and a piecewise linear function in particular) seems to be a recurring question on this list. Nevertheless, I was not able to find an answer to a question that bothers me. Suppose I have the following data set, and would want to fit it with a piecewise smooth curve, In this model data, one curve is valid for up to 3 and another one for
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
2004 Mar 22
2
Handling of NAs in functions lrm and robcov
Hi R-helpers I have a dataframe DF (lets say with the variables, y, x1, x2, x3, ..., clust) containing relatively many NAs. When I fit an ordinal regression model with the function lrm from the Design library: model.lrm <- lrm(y ~ x1 + x2, data=DF, x=TRUE, y=TRUE) it will by default delete missing values in the variables y, x1, x2. Based on model.lrm, I want to apply the robust covariance
2005 Aug 12
0
HowTo derive a correct likelihood-ratio chi-squared statistic from lrm() with a rsc() ?
Dear R helpers, >From the lrm( ) model used for binary logistic regression, we used the L.R. model value (or the G2 value, likelihood-ratio chi-squared statistic) to evaluate the goodness-of-fit of the models. The model with the lowest G2 value consequently, has the best performance and the highest accuracy. However our model includes rsc() functions to account for non-linearity. We
2006 Nov 14
1
Using lrm
Hi, I have to build a logistic regression model on a data set that I have. I have three input variables (x1, x2, x3) and one output variable (y). The syntax of lrm function looks like this lrm(formula, data, subset, na.action=na.delete, method="lrm.fit", model=FALSE, x=FALSE, y=FALSE, linear.predictors=TRUE, se.fit=FALSE, penalty=0, penalty.matrix, tol=1e-7,
2008 Mar 03
1
using 'lrm' for logistic regression
Hi R, I am getting this error while trying to use 'lrm' function with nine independent variables: > res = lrm(y1994~WC08301+WC08376+WC08316+WC08311+WC01001+WC08221+WC08106+WC0810 1+WC08231,data=y) singular information matrix in lrm.fit (rank= 8 ). Offending variable(s): WC08101 WC08221 Error in j:(j + params[i] - 1) : NA/NaN argument Now, if I take choose only four
2006 Oct 02
1
a question regarding 'lrm'
Hi List, I don't understand why 'lrm' doesn't recognize the '~.' formula. I'm pretty sure it was working before. Please see below: I'm using R2.3.0, WinXP, Design 2.0-12 thanks, ...Tao > dat <- data.frame(y=factor(rep(1:2,each=50)), x1=rnorm(100), x2=rnorm(100), x3=rnorm(100)) > lrm(y~., data=dat, x=T, y=T) Error in terms.formula(formula, specials =
2010 Apr 26
1
logical(0) response from lrm
What causes the error report: logical(0) to arise in the rms function lrm? Here's my data: But both the dependent and the independent variable seem fine... > str(AABB) 'data.frame': 1176425 obs. of 9 variables: $ sex : int 1 1 0 1 1 0 0 0 0 0 ... $ faint : int 0 0 0 0 0 0 0 0 0 0 ... Here's the simplified model and error AABB$model1 < lrm (faint ~ sex)
2011 Nov 12
2
Odds ratios from lrm plot
The code library(Design) f <- lrm(y~x1+x2+x1*x2, data=data) plot(f) produces a plot of log odds vs x2 with 0.95 confidence intervals. How do I get a plot of odds ratios vs x2 instead? Thanks -- View this message in context: http://r.789695.n4.nabble.com/Odds-ratios-from-lrm-plot-tp4033340p4033340.html Sent from the R help mailing list archive at Nabble.com.
2009 Jul 10
1
prevalence in logistic regression lrm()
Hi, I am wondering if there is a way to specify the prevalence of events in logistic regression using lrm() from Design package? Linear Discriminant Analysis using lda() from MASS library has an argument "prior=" that we can use to specify the prevalent of events when the actual dataset being analyzed does not have a representative prevalence. How can we incorporate this information in
2006 Jul 04
1
using weights in lrm
Dear all, just a quick question regarding weights in logistic regression. I do results <- lrm(y.js ~ h.hhsize + h.death1 + h.ill1 + h.ljob1 + h.fin1 + h.div1 + h.fail1 + h.sex + h.ch.1
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
2004 Feb 16
1
Binary logistic model using lrm function
Hello all, Could someone tell me what I am doing wrong here? I am trying to fit a binary logistic model using the lrm function in Design. The dataset I am using has a dichotomous response variable, 'covered' (1-yes, 0-no) with explanatory variables, 'nepall', 'title', 'abstract', 'series', and 'author1.' I am running the following script and
2010 Aug 11
3
extracting the standard error in lrm
Hi, I would like to extract the coefficients of a logistic regression (estimates and standard error as well) in lrm as in glm with summary(fit.glm)$coef Thanks David
2008 Jan 05
1
AUC values from LRM and ROCR
Dear List, I am trying to assess the prediction accuracy of an ordinal model fit with LRM in the Design package. I used predict.lrm to predict on an independent dataset and am now attempting to assess the accuracy of these predictions. >From what I have read, the AUC is good for this because it is threshold independent. I obtained the AUC for the fit model output from the c score (c =
2009 Aug 29
3
lrm in Design
Hello everybody, I am trying to do a logistic regression model with lrm() from the design package. I am comparing to groups with different medical outcome which can either be "good" or "bad". In the help file it says that lrm codes al responses to 0,1,2,3, etc. internally and does so in alphabetical order. I would guess this means bad=0 and good=1. My question: I am trying to
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 ~