similar to: to get R-squared value

Displaying 20 results from an estimated 60000 matches similar to: "to get R-squared value"

2009 Jul 10
2
to get the R-Squared value
Dear all, I know there are 'coef', 'predict', 'fit' to get the corresponding outputs. Is that possible to get the value of R-squared from a 'lm' output? Many thanks.
2013 Jan 28
2
Adjusted R-squared formula in lm()
What is the exact formula used in R lm() for the Adjusted R-squared? How can I interpret it? There seem to exist several formula's to calculate Adjusted R-squared. Wherry’s formula [1-(1-R2)·(n-1)/(n-v)] McNemar’s formula [1-(1-R2)·(n-1)/(n-v-1)] Lord’s formula [1-(1-R2)(n+v-1)/(n-v-1)] Stein 1-(n-1/n-k-1)(n-2)/n-k-2) (n+1/n) Theil's formula (found here:
2006 Aug 31
0
Pretty-printing multiple regression models
A few days ago, I had asked this question. Consider this situation: > x1 <- runif(100); x2 <- runif(100); y <- 2 + 3*x1 - 4*x2 + rnorm(100) > m1 <- summary(lm(y ~ x1)) > m2 <- summary(lm(y ~ x2)) > m3 <- summary(lm(y ~ x1 + x2)) You have estimated 3 different "competing" models, and suppose you want to present the set of models in one table. xtable(m1) is
2009 Apr 05
4
extract the p value of F statistics from the lm class
Dear R users I have run an regression and want to extract the p value of the F statistics, but I can find a way to do that. x<-summary(lm(log(RV2)~log(IV.m),data=b)) Call: lm(formula = log(RV2) ~ log(IV.m), data = b[[11]]) Residuals: Min 1Q Median 3Q Max -0.26511 -0.09718 -0.01326 0.11095 0.29777 Coefficients: Estimate Std. Error t value Pr(>|t|)
2011 Mar 04
1
linear model - lm (Adjusted R-squared)?
Hi, Sorry for the naive question, but what exactly does the 'Adjusted R-squared' coefficient in the summary of linear model adjust for? Sample code: > x <- rnorm(15) > y <- rnorm(15) > lmr <- lm(y~x) > summary(lmr) Call: lm(formula = y ~ x) Residuals: Min 1Q Median 3Q Max -1.7828 -0.7379 -0.4485 0.7563 2.1570 Coefficients:
2009 Jan 20
1
inconsistent lm results with fixed response variable
Hi, I'm analyzing a large number of simulations using lm(), a sample of the resulting data is pasted below. In some simulations, the response variable doesn't vary, ie: > tmp[[2]]$richness [1] 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 When I analyze this using R version 2.8.0 (2008-10-20) on a linux cluster, I get an appropriate result: ## begin R
2009 Sep 24
2
P-value and R-squared variable selection criteria
Hi R community I have a question. I'll explain my situation. I have to build a climate model to obtain monthly and annual temperature from 2004 to 2008 from a specif area in Almeria (Spain). To build this climate model, I will use Multiple regression. My dependant variable will be monthly and annual temperature and independant variables will be Latitute, Longitude and Altitude and I will work
2011 Jun 28
2
How do I output all the R-squares of an SUR? summary(fitSUR$eq[[1:4]])$r.squared does not work
Greetings R Users, I have a system of equations for which I would like to output all the R-squares. Assume there are four equations in my system, the only way I found to output all the R-squares is by calling them out one by one as this: summary(fitSUR$eq[[1]])$r.squared summary(fitSUR$eq[[2]])$r.squared summary(fitSUR$eq[[3]])$r.squared summary(fitSUR$eq[[4]])$r.squared But isn't there a
2010 Jan 22
4
Extract R-squared from summary of lm
Dear all, I cannot find to explicitly get the R-squared or adjusted R-squared from summary(lm()) Thanks a lot! [[alternative HTML version deleted]]
2006 Jan 12
0
Obtaining the adjusted r-square given the regression
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???????????????? Dear Alexandra, Without knowing what routine you were using that returned an R-Square value too you, it is a little difficult to tell. I am not able to comment on your routine, but I'll try to give a
2010 Jul 19
0
Calculation optimization advice needed
Dear all, I produced a part of code which does what needed but by estimations I would need to wait for that for 300 hours!!! Maybe someone can give a me a glance advice or something. Thanks a lot! I need to define maximum adjusted R-squares from regression model: returns as dependent variable( here simulated to be normal) and 3 factors out of say 14 independent (simulated here). I need to run lm
2006 Aug 31
0
Ooops, small mistake fixed (pretty printing multiple models)
The R code I just mailed out had a small error in it. This one works. Now what one needs is a way to get decimal alignment in LaTeX tabular objects. x1 <- runif(100); x2 <- runif(100); y <- 2 + 3*x1 - 4*x2 + rnorm(100) m1 <- summary(lm(y ~ x1)) m2 <- summary(lm(y ~ x2)) m3 <- summary(lm(y ~ x1 + x2)) # What I want is this table: # #
2010 Jan 08
2
how to get perfect fit of lm if response is constant
Hello. Consider the response-variable of data.frame df is constant, so analytically perfect fit of a linear model is expected. Fitting a regression line using lm result in residuals, slope and std.errors not exactly zero, which is acceptable in some way, but errorneous. But if you use summary.lm it shows inacceptable error propagation in the calculation of the t value and the corresponding
2010 Jan 29
3
extract R-squared and P-value from lm results
Hi, R Users I find a problem in extracting the R-squared and P-value from the lm results described below (in Italic), *Residual standard error: 2.25 on 17 degrees of freedom* *Multiple R-squared: 0.001069, Adjusted R-squared: -0.05769 * *F-statistic: 0.01819 on 1 and 17 DF, p-value: 0.8943 * * * Any suggestions will be appreciated. Thanks. Wenjun [[alternative HTML version deleted]]
2010 Dec 02
2
How to call R-squared values from lm's?
I would like to call both p-values and R-squared values from lm's in a function. I can get the p-values from coef(summary(name.lm))[r,c], however, I cannot figure out how to call the R-squared values without manually calling the summary and inserting them in the script - which negates the value of automating the process through a function. Thanks, Mike [[alternative HTML version deleted]]
2004 Jul 22
1
Bug: wrong R-squared in lm formula w/o intercept (PR#7127)
Full_Name: Adriano Azevedo Filho Version: 1.9.1 OS: Windows, Linux Submission from: (NULL) (200.171.246.212) R-squared and Adjusted R-squared appear to be wrong when the formula in lm() is specified without intercept. Problem present in both Windows and Linux 1.9.1 version. Also in the 1.8.1 version for Windows (other versions not checked). Possible example which reproduces the problem:
2006 Nov 21
1
R-squared with and without constant
Greetings Listers! the R-squared value reported by summary of lm is calculated as 1 - RSS/RSS_m where RSS_m is the residual sum of squares of a minimal model. In most cases, the minimal model is simply y = mean(y), but when a constant is left out of the model, the minimal model is y = 0. However, if you manually add a constant, R still considers y = 0 the minimal model. This also causes
2012 Sep 25
2
Regsubsets model selection
Hi, I have 12 independent variables and one dependent variable. Now I want to select the best adj. R squared model by using the regsubsets command, so I code: > plot(regsubsets(Gesamt ~ CommunistSocialist + CountrySize + GNI + Lifeexp + Schoolyears + ExpMilitary + Mortality + + PopPoverty + PopTotal + ExpEdu + ExpHealth, data=olympiadaten, nbest=1, nvmax=12), scale='adjr2') Then I
2009 Oct 13
2
Linear Regression Question
Dear Sir or Madam, I am a student at MSc Probability and Finance at Paris 6 University/ Ecole Polytechnique. I am using R and I can't find an answer to the following question. I will be very thankful if you can answer it. I have two vectors rendements_CAC40 and rendements_AlcatelLucent. I use the lm function as follows, and then the sumarry function: regression=lm(rendements_CAC40 ~
2012 Oct 23
2
Export summary from regression output
Hi there, I tried it many times but didn't get it worked. I just want to export the summary of a OLS regression (lm() function) into a csv-file including the "call"-formula", "coefficients", "r-squared", " adjusted r-squared" and "f statistic". I know I can export: write.csv2(Regression_60d_ann$coefficients,