similar to: diagnostic functions to assess fitted ols() model: Confidence is too narrow?!

Displaying 20 results from an estimated 2000 matches similar to: "diagnostic functions to assess fitted ols() model: Confidence is too narrow?!"

2010 Jan 27
1
control of scat1d tick color in plot.Predict?
Hi All, I have a quick question about using plot.Predict now that the rms package uses lattice. I'd like to add tick marks along the regression line, which is given by data=llist(variablename) in the plot call. The ticks show up fine, but I'd like to alter the color. I know the ticks are produced by scat1d, but after spending a fair bit of time going through documentation, it still
2012 Apr 30
1
question on jitter in plot.Predict in rms
Dear colleagues, I have a question regarding controlling the jitter when plotting predictions in the rms package. Below I've simulated some data that reflect what I'm working with. The model predicts a continuous variable with an ordinal score, a two-level group, and a continuous covariate. Of primary interest is a plot of the group by score interaction, where the score is the ordinal
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,
2010 Jan 21
1
Simple effects with Design / rms ols() function
Hi everyone, I'm having some difficulty getting "simple effects" for the ols() function in the rms package. The example below illustrates my difficulty -- I'll be grateful for any help. #make up some data exD <- structure(list(Gender = structure(c(1L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 1L, 2L, 2L, 2L, 1L, 2L), .Label = c("F", "M"), class = "factor"),
2005 Aug 22
1
How to add legend of plot.Design function (method=image)? (if (!.R.) )
Hi, When running z <- plot(fit, age=NA, cholesterol=NA, perim=boundaries, method='image') Legend(z, fun=plogis, at=qlogis(c(.01,.05,.1,.2,.3,.4,.5)), zlab='Probability') And after pointing the cursor to the plot() screen in R, I obtain the following message: Using function "locator(2)" to place opposite corners of image.legend Error in
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 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:
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
2010 May 05
2
OLS Regression diagnostic measures check list - what to consider?
Hello dear R help list, I wish to compile a check-list for diagnostic measures for OLS regression. My question: Can you offer more (or newer) tests/measures for the validity of a linear model then what is given here: http://www.statmethods.net/stats/rdiagnostics.html This resource gives a list of measures to test for: OUTLIERS, INFLUENTIAL OBSERVATIONS, NON-NORMALITY, NON-CONSTANT ERROR
2011 May 17
2
can not use plot.Predict {rms} reproduce figure 7.8 from Regression Modeling Strategies (http://biostat.mc.vanderbilt.edu/wiki/pub/Main/RmS/course2.pdf)
Dear R-users, I am using R 2.13.0 and rms 3.3-0 , but can not reproduce figure 7.8 of the handouts *Regression Modeling Strategies* ( http://biostat.mc.vanderbilt.edu/wiki/pub/Main/RmS/course2.pdf) by the following code. Could any one help me figure out how to solve this? setwd('C:/Rharrell') require(rms) load('data/counties.sav') older <- counties$age6574 + counties$age75
2012 Oct 20
1
rms plot.Predict question: swapping x- and y- axis for categorical predictors
Hello all, I'm trying to plot the effects of variables estimated by a regression model fit individually, and for categorical predictors, the independent variable shows up on the y-axis, with the dependent variable on the x-axis. Is there a way to prevent this reversal? Sample code with dummy data: # make dummy data set.seed(1) x1 <- runif(200) x2 <- sample(c(1,2),200, TRUE) x3 <-
2007 Sep 27
1
R: anova.Design
Dear All: I tried to replicate a case study described by Prof. Harrell in Chapter 7 of his Regression Modeling Strategies book, but failed on using anova.Design to reproduce his table 7.1, Following is the code: rm(list=ls()) library(Hmisc) library(Design) getHdata(counties) counties$older <- counties$age6574 + counties$age75 label(counties$older) <- '% age >= 65, 1990'
2010 Mar 02
2
ANOVA "Types" and Regression models: the same?
Hello, I think I am beginning to understand what is involved in the so-called "Type-I, II, ..." ANOVAS (thanks to all the replies I got for yesterday's post). I have a question that will help me (and others?) understand it better (or remove a misunderstanding): I know that ANOVA is really a special case of regression where the predictor variable is categorical. I know that there
2009 Oct 26
1
Cbind() on the right-side of a formula in xYplot()
Hi, Using the latest rms package I am able to make nice plots of model predictions +/- desired confidence intervals like this: # need this library(rms) # setup data d <- data.frame(x=rnorm(100), y=rnorm(100)) dd <- datadist(d) options(datadist='dd') # fit model l <- ols(y ~ rcs(x), data=d) # predict along original limits of data l.pred <- Predict(l) # plot of fit and
2007 Oct 19
1
plot.Design
Dear R-users: I am trying to use the following code to reproduce the figures on page 140 of Prof. Frank Harrell's book 'Regression Modeling Strategies': rm(list=ls()) options(width=128) library(Hmisc) library(Design) getHdata(counties) counties$older <- counties$age6574 + counties$age75 label(counties$older) <- '% age >= 65, 1990' counties$pdensity <-
2007 Mar 21
1
how to get "lsmeans"?
Dear all, I search the mail list about this topic and learn that no simple way is available to get "lsmeans" in R as in SAS. Dr.John Fox and Dr.Frank E Harrell have given very useful information about "lsmeans" topic. Dr. Frank E Harrell suggests not to think about lsmeans, just to think about what predicted values wanted and to use the predict
2010 Feb 17
1
strangeness in Predict() {rms}
Hi, Running the following example from ?Predict() throws an error I have never seen before: set.seed(1) x1 <- runif(300) x2 <- runif(300) ddist <- datadist(x1,x2); options(datadist='ddist') y <- exp(x1+ x2 - 1 + rnorm(300)) f <- ols(log(y) ~ pol(x1,2) + x2) p1 <- Predict(f, x1=., conf.type='mean') Error in paste(nmc[i], "=", if (is.numeric(x))
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:
2005 Apr 15
1
Range in probabilities of a fitted lrm model (Y~X)
Dear R-list, Is there a function or technique by which the probability (or log odds) range of a logistic model (fit <- lrm(Y~X)) can be derived? The aim is to obtain min & max of the estimated probabilities of Y. Could summary.Design() be used for that or is there another method/trick? Thanks, Jan _______________________________________________________________________ ir. Jan
2005 Jan 17
2
Omitting constant in ols() from Design
Hi! I need to run ols regressions with Huber-White sandwich estimators and the correponding standard errors, without an intercept. What I'm trying to do is create an ols object and then use the robcov() function, on the order of: f <- ols(depvar ~ ind1 + ind2, x=TRUE) robcov(f) However, when I go f <- ols(depvar ~ ind1 + ind2 -1, x=TRUE) I get the following error: Error in