similar to: Calculating R2 for a unit slope regression

Displaying 20 results from an estimated 1000 matches similar to: "Calculating R2 for a unit slope regression"

2002 May 09
4
Rsquared in summary(lm)
Hello, I'm doing some linear regression: >lm<-lm(osas~alp,data) >summary(lm) However, the Rsquared in the output of summary() is not the same as the "standard" Rsquared calculated by spreadsheets, and outlined in statistical guidebooks, being SSR/SSTO. The output says "multiple Rsquared", but it is no multiple regression... What's the difference? Thanks,
2007 May 17
4
R2 always increases as variables are added?
Hi, everybody, 3 questions about R-square: ---------(1)----------- Does R2 always increase as variables are added? ---------(2)----------- Does R2 always greater than 1? ---------(3)----------- How is R2 in summary(lm(y~x-1))$r.squared calculated? It is different from (r.square=sum((y.hat-mean (y))^2)/sum((y-mean(y))^2)) I will illustrate these problems by the following codes:
2002 May 11
2
Bug on Mac version of lm()?
Dear Mac users, Hi, as you might have probably read the thread of "[R] Rsquared in summary(lm)" on May 10, it seems that Mac version of lm() seem to be working incorrectly. I enclose the script to produce the result both for lm() and manual calculation for a simple regression. Could you run the script and report with the version of R, so I don't have to go through every builds
2012 Jul 18
1
Regression Identity
Hi, I see a lot of folks verify the regression identity SST = SSE + SSR numerically, but I cannot seem to find a proof. I wonder if any folks on this list could guide me to a mathematical proof of this fact. Thanks. David. -- View this message in context: http://r.789695.n4.nabble.com/Regression-Identity-tp4636829.html Sent from the R help mailing list archive at Nabble.com.
2012 Nov 16
2
R-Square in WLS
Hi, I am fitting a weighted least square regression and trying to compute SSE,SST and SSReg but I am not getting SST = SSReg + SSE and I dont know what I am coding wrong. Can you help please? xnam <-colnames(X) # colnames Design Matrix fmla1 <- as.formula(paste("Y ~",paste(xnam, collapse=
2009 Jul 25
2
r2 question
Hi everyone, I have a question about calculating r-squared in R. I have tried searching the archives and couldn't find what I was looking for - but apologies if there is somewhere I can find this... I carried out a droughting experiment to test plant competition under limited water. I had: - 7 different levels of watering treatment (1 -7 - from most watered to least watered/) - 15
2010 Apr 16
3
GSL in C code for R
Dear fellow R users, I am now investing time in learning how to use compiled C code to produces functions that can be used in R. I am just starting, and there is much that I need to learn, so I have a question that might be straight forward. I am learning how to use function in the C library GSL (gnu scientific library), to write C code, that I then plant to use in R. Is there any problem in
2006 Jan 10
2
Obtaining the adjusted r-square given the regression coefficients
Hi people, I want to obtain the adjusted r-square given a set of coefficients (without the intercept), and I don't know if there is a function that does it. Exist???????????????? I know that if you make a linear regression, you enter the dataset and have in "summary" the adjusted r-square. But this is calculated using the coefficients that R obtained,and I want other coefficients
2010 Jul 07
2
R2 function from PLS to use a model on test data
Hello, I am having some trouble using a model I created from plsr (of train) to analyze each invididual R^2 of the 10 components against the test data. For example: mice1 <- plsr(response ~factors, ncomp=10 data=MiceTrain) R2(mice1) ##this provides the correct R2 for the Train data for 10 components ## Now my next objective is to calculate my model's R2 for each component on the
2008 Jul 20
4
drawing segments through points with pch=1
Please excuse me for asking such basic questions: Here is my code > y=c(1.21,0.51,0.14,1.62,-0.8,0.72,-1.71,0.84,0.02,-0.12) > ybar=mean(y) > ll=length(y); > ybarv=rep(ybar,ll) > x=1:ll > plot(x,ybarv,pch=1) > segments(x[1],ybar,x[ll],ybar) What I get is a collection of small circles, with a segment "on top" of the circles, which is almost what I want. But I
2010 Nov 16
2
Vectors out of lists?
Hello there I have a list, Y, and each component of that list is a real-valued function (that is, Y[[i]](u) returns a number). I was wishing to build the mean function and the first thing I thought of was Ybar<-function(u){ mean(Y[[1:n]](u)) } but obviously this doesn't work, since Y[[1:n]] is not allowed at all. Any elegant suggestions? I really would like to avoid something like
2004 Jul 01
2
R can't find some functions in assist package
Oh yes. The "load package" under the "packages menu" in the Windows version does that. To check I typed "library(assist)" after starting R. Same behavior, ssr is found, but others like predict.ssr, and plot.ssr, give a "not found" message. Thanks for the suggestion. Mike
2008 Jul 20
3
asp and ylim
#See David Williams' book "Weighing the odds", p286 y <- c(1.21, 0.51, 0.14, 1.62, -0.8, 0.72, -1.71, 0.84, 0.02, -0.12) ybar <- mean(y) ylength <- length(y) ybarv <- rep(ybar, ylength) x <- 1:ylength plot(x,y,asp=1,xlab="position",ylab="ybar",type="n",ylim=c(-1,1)) segments(x[1], ybar, x[ylength], ybar) segments(x,ybarv,x,y)
2005 Mar 08
1
coefficient of partial determination...partial r square [ redux]
If I'm not mistaken, partial R-squared is the R^2 of the quantities plotted in a partial residual plot, so you can base the computation on that. Prof. Fox's `car' package on CRAN has a function for creating those plots, but you need to figure out the way to extract the quantities being plotted. [In any case, the basic tools for doing such computations are all in R, and it
2013 May 16
2
R looping help
Hey I'm not really sure what I should put on here, but I am having trouble with my R code. I am trying to get the p-values, R^2s etc for a number of different groups of variables that are all in one dataset. This is the code: #Stand counter st<-1 #Collections stands<-numeric(67) slopes<-numeric(67) intercepts<-numeric(67) mses<-numeric(67) rsquares<-numeric(67)
2011 Jun 03
2
Y error bars, dates on the X-axis
Dear forum, Does anyone know any functions for plotting vertical error bars, if the x-axis variable is a date? I can produce a pretty plot with dates on the x-axis, if I don't want to include error bars. I can also produce a nice plot with error bars, if I just use Julian days for the x-axis, but I'd much rather have the actual dates. I have tried writing my own function, plotCI
2008 Sep 06
2
Hopefully an easy error bar question
Hi im trying to add error bars to my barplots, there very basic, i have a few grapghs where the y variable is different but on all the X variable is Age (Adult and Juvenile) however this is split into two levels so i have males and females, so my graph basically has four bars on it. I know how to add eror bars for instance when there is only one level eg lookng at the diffrence between male and
2006 Jun 16
2
Effect size in mixed models
Hello, Is there a way to compare the relative relevance of fixed and random effects in mixed models? I have in mind measures of effect size in ANOVAs, and would like to obtain similar information with mixed models. Are there information criteria that allow to compare the relevance of each of the effects in a mixed model to the overall fit? Thank you, Bruno
2012 Nov 13
1
About systemfit package
Dear friends, I have written the following lines in R console wich already exist in pdf file systemfit: data( "GrunfeldGreene" ) library( "plm" ) GGPanel <- plm.data( GrunfeldGreene, c( "firm", "year" ) ) greeneSur <- systemfit( invest ~ value + capital, method = "SUR", + data = GGPanel ) greenSur I have obtained the following incomplete
2007 Sep 25
2
Need help with function writing
Hello: If anyone could guide me with this I would greatly appreciate it. Thanking you in advance for your assistance. Using a 3-level input factor alternative so that a function(below) can compute both a two-sided and one-sided p-values. Making the two-sided test the default. And produce output information about which alternative was tested. Where would I place the ifelse statement?