similar to: rms package-superposition prediction curve of ols and data points

Displaying 20 results from an estimated 400 matches similar to: "rms package-superposition prediction curve of ols and data points"

2011 Mar 09
2
rms: getting adjusted R^2 from ols object
How can I extract the adjusted R^2 value from an ols object (using rms package)? library(rms) x <- rnorm(10) y <- x + rnorm(10) ols1 <- ols(y ~ x) Typing "ols1" displays adjusted R^2 among other things, but how can I assign it to a variable? I tried str(ols1) but couldn't see where to go from there. Thanks, Mark Seeto
2010 Jun 07
1
ols function in rms package
Hello, I have a couple of questions about the ols function in Frank Harrell's rms package. Is there any way to specify variables by their column number in the data frame rather than by the variable name? For example, library(rms) x1 <- rnorm(100, 0, 1) x2 <- rnorm(100, 0, 1) x3 <- rnorm(100, 0, 1) y <- x2 + x3 + rnorm(100, 0, 5) d <- data.frame(x1, x2, x3, y) rm(x1, x2, x3,
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"),
2011 Apr 12
2
Model formula for ols function (rms package)
Dear R help, I'm having some trouble with model formulas for the ols function in the rms package. I want to have two variables represented as restricted cubic splines, and also include an interaction as a product of linear terms, but I get an error message. library(rms) d <- data.frame(x1 = rnorm(50), x2 = rnorm(50), y = rnorm(50)) ols(y ~ rcs(x1,3) + rcs(x2,3) + x1*x2, data=d) Error in
2004 Oct 11
1
nlm question
Dear R People: I am trying to duplicate the example from Dennis and Schnabel's "Numerical Methods for Unconstrained Optimization and Nonlinear Equations", which starts on page 149. My reason for doing so: to try to understand the "nlm" function. Here is the function: >mfun1 function(x) { z <- matrix(0,nrow=2,ncol=1) z[1,1] <- x[1]^2 + x[2]^2 -
2009 Sep 08
0
New package: rms
This is to announce a new package rms on CRAN. rms goes along with my book Regression Modeling Strategies. The home page for rms is http://biostat.mc.vanderbilt.edu/rms, or go directly to http://biostat.mc.vanderbilt.edu/Rrms for information just about the software. rms is a re-write of the Design package that has improved graphics and that duplicates very little code in the survival
2009 Sep 08
0
New package: rms
This is to announce a new package rms on CRAN. rms goes along with my book Regression Modeling Strategies. The home page for rms is http://biostat.mc.vanderbilt.edu/rms, or go directly to http://biostat.mc.vanderbilt.edu/Rrms for information just about the software. rms is a re-write of the Design package that has improved graphics and that duplicates very little code in the survival
2011 Mar 18
1
points() rendering points outside of input
As a followup to pi-day, I attempted to make a .gif of a simulation based estimation of pi by plotting points inside a single quadrant of a circle (a la?http://www.drewconway.com/zia/?p=2667 ). ?When rendering the individual x,y pairs with points() I intermittently see points crop up around (2,0.5) but the input values for x and y are bounded between 0 and 1. square<-structure(c(0, 0, 1, 1, 0,
2006 Jul 13
1
ols/gls or systemfit (OLS, WLS, SUR) give identical results
I might be sorry for asking this question :-) I have two equations and I tried to estimate them individually with "lm" and "gls", and then in a system (using systemfit) with "OLS", "WLS" and "SUR". Quite surprisingly (for myself at least) the results are identical to the last digit. Could someone (please!) give a hint as to what am I
2003 Oct 29
0
constrained OLS
Hi, I would like to know if anyone has any idea of how to run an OLS with constraints? thank you Soyoko ______________________________________ Ms. Soyoko Umeno Graduate Research Assitant for the Illinois-Missouri Biotechnology Alliance (IMBA) at http://www.imba.missouri.edu/ Ph.D. Student at the Department of Agricultural and Consumer Economics at the University of Illinois at Urbana-Champaign
2009 Feb 16
4
assuming AR(1) residuals in OLS
Hi to all, In other statistical software, such as Eviews, it is possible to regress a model with the Least Squares method, assuming that the residuals follow an AR(q) process. For example the resulting regression is something like y = 1.2154 + 0.2215 x + 0.251 AR(1) How is it possible to do the same in R? Thank you very much in advance, Constantine Tsardounis http://www.costis.name
2012 Sep 28
0
Questions about the functions ar.ols and auto.arima when fitting an AR model
Hi, I am trying to fit an AR model, maximum order =4, order selection criterion is aic. I wonder why these two give different results: m1<-ar.ols(x, aic=TRUE, method="ols", order.max=4) m1<-auto.arima(x,d=0, D=0, max.p=4, max.P=0, max.q=0, max.Q=0, ic="aic") Could they both use the function predict to do forecasting? Is there any function that works better?
2006 May 25
0
Problem with ols in quantreg package
Hello everybody! I am currently using the quantreg package on R 2.2.1. for my diploma thesis and want to create plots with plot.summary.rqs, which should work like this: Usage: plot.summary.rqs(x, nrow=3, ncol=2, alpha = 0.1, ols = TRUE, ...) Arguments: x: an object produced by rq() fitting nrow: rows in mfrow ncol: columns in mfrow alpha: alpha level of
2004 Nov 11
1
OLS error
Hi, I have 142 observations off different variables and I'm trying to do a OLS. And I get this error. Any Ideas ? > f <- ols(lnmigr3~popden78+income+modern+spareha+rain) Error in La.chol2inv(x, size) : size cannot exceed nrow(x) = 1 D. ----------------------------------------- Stay ahead of the information curve. Receive GIS news and jobs on your desktop daily. Subscribe today
2006 Aug 15
1
fMultivar OLS - how to do dynamic regression?
Hi folks! Does anybody know how to use the OLS function in fMultivar to do dynamic regression? I've tried specifying lags in OLS using a data series created in fSeries and it doesn't seem to work. I've done dynamic regression using dyn$lm and I was wondering how to accomplish the same thing using the OLS function from fMultivar. Thanks! John [[alternative HTML version
2009 Aug 31
1
clarificatin on validate.ols method='cross'
Hi, I was hoping to clarify the exact behavior associated with this incantation: validate(fit.ols, method='cross', B=50) Output: index.orig training test optimism index.corrected n R-square 0.5612 0.5613 0.5171 0.0442 0.5170 50 MSE 1.3090 1.3086 1.3547 -0.0462 1.3552 50 Intercept 0.0000 0.0000 -0.0040 0.0040
2009 Sep 14
0
fastest OLS w/ NA's and need for SE's
dear R wizards: apologies for two queries in one day. I have a long form data set, which identifies about 5,000 regressions, each with about 1,000 observations. unit date y x 1 20060101 <two values> 1 20060102 <two values> ... 5000 20081230 <two values> 5000 20081231 <two values> I need to run such regressions many many times, because they are part of an
2010 May 02
0
how to plot forecast together with historical series in OLS or special ARIMA model
Dear R users, Please let me know how to plot the forecast in such a model: First I do it simple with ARIMA model that works ok with the codes provided to me at the lecture: arima<-arima(HCPIlong, order=c(1,1,0)) arima.predict<-predict(arima, n.ahead= 5 ) ts.plot(HCPIlong,arima.predict$pred,lty=1:2, main="Forecast of HCPI") But I need to include the additional variable in my
2024 Feb 22
1
help - Package: stats - function ar.ols
Hello, My name is Pedro and it is nice to meet you all. I am having trouble understanding a message that I receive when use function ar.ols from package stats, it says that "Warning message: In ar.ols(x = dtb[2:6966, ], demean = FALSE, intercept = TRUE, prewhite = TRUE) : model order: 2 singularities in the computation of the projection matrix results are only valid up to model order 1,
2007 Jan 08
1
Multivariate OLS
Dear all R users, Suppose I have a VECTOR of time series y[t] consists of 2000 data point. For example suppose I have data frame which has two columns. First column represents a time series of exchange rate for 2000 days. And the second column represents the price of a commodity for the same period. Now I want to fit a OLS regression like that, y[t] = a + b*delta[y[t-1]] + c*delta[y[t-2]] +