similar to: Regression Identity

Displaying 20 results from an estimated 1000 matches similar to: "Regression Identity"

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=
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,
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
2008 Nov 03
2
Calculating R2 for a unit slope regression
Does anyone know of a literature reference, or a piece of code that can help me calculate the amount of variation explained (R2 value), in a regression constrained to have a slope of 1 and an intercept of 0? Thanks! Sebastian J. Sebastián Tello Department of Biological Sciences 285 Life Sciences Building Louisiana State University Baton Rouge, LA, 70803 (225) 578-4284 (office and lab.)
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:
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
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
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
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
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)
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
2010 Feb 27
1
Newbie help with ANOVA and lm.
Would someone be so kind as to explain in English what the ANOVA code (anova.lm) is doing? I am having a hard time reconciling what the text books have as a brute force regression and the formula algorithm in 'R'. Specifically I see: p <- object$rank if (p > 0L) { p1 <- 1L:p comp <- object$effects[p1] asgn <-
2010 Aug 30
2
while loop until end of file
Hi Guys, stumped by a simple problem. I would like to take a file of the form Pair group param1 1 D 10 1 D 10 1 R 10 1 D 10 2 D 10 2 D 10 2 D 10 2 R 10 2 R 10 etc.. and for each pair, calculate the average of
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
2007 Jul 12
1
p-value from survreg
The question was how to get the p-value from the fit below, as an S object sr<-survreg(s~groups, dist="gaussian") Coefficients: (Intercept) groups -0.02138485 0.03868351 Scale= 0.01789372 Loglik(model)= 31.1 Loglik(intercept only)= 25.4 Chisq= 11.39 on 1 degrees of freedom, p= 0.00074 n= 16 ---- In general, good places to start are > names(sr) >
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
2004 Jun 21
2
Elementary sapply question
I am discovering sapply! :-) Could you please help me with a very elementary question? Here is what I know. The following two programs generate the same answer. --------------------------------+---------------------------------------- Loops version | sapply version --------------------------------+----------------------------------------