Displaying 20 results from an estimated 120 matches similar to: "lm: how to calculate rsquared of the predicted values?"
2007 Dec 11
1
postResample R² and lm() R²
Hello,
I'm with a conceptual doubt regarding Rsquared of both lm() and
postResample(library caret).
I've got a multiple regression linear model (lets say mlr) with anR² value
of 67.52%.
Then I use this model pro make predictions with predict() function using the
same data as input , that is, use the generated model to predict the value
associated with data that I used as input.
Next, if
2023 May 09
1
RandomForest tuning the parameters
Hi Sacha,
On second thought, perhaps this is more the direction that you want ...
X2 = cbind(X_train,y_train)
colnames(X2)[3] = "y"
regr2<-randomForest(y~x1+x2, data=X2,maxnodes=10, ntree=10)
regr
regr2
#Make prediction
predictions= predict(regr, X_test)
predictions2= predict(regr2, X_test)
HTH,
Eric
On Tue, May 9, 2023 at 6:40?AM Eric Berger <ericjberger at gmail.com>
2011 Jul 12
0
Adding a correlation value (like Rsquared) to a 4 parameter logistic fit model.
Hello,
In my lab we use a four parameter logistic fit model for our ELISA data
(absorbance values). We are currently testing the use of different solvents
and need to find a way to add a correlation value (such as an R squared or
something similar) so we can test different solvents in making this standard
curve. We currently use the drc package and this is our script for the 4
parameter:
2011 Apr 15
3
Rsquared for anova
I calculate an anova test in the following way:
expdata<-read.table("/home/dorien/UA/meta-music/optimuse/optimuse1-build-desktop/results/results_processedCP",
header=TRUE)
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,
2023 May 08
1
RandomForest tuning the parameters
Dear R-experts,
Here below a toy example with some error messages, especially at the end of the code (Tuning the parameters). Your help to correct my R code would be highly appreciated.
#######################################
#libraries
library(lattice)
library(ggplot2)
library(caret)
library(randomForest)
??
#Data
2010 Jan 03
3
R2HTML Report number format, or Better Way?
Here I am again with question I'll feel foolish for asking, when I
see the answer.
I'm trying to produce a report and here's where I get stuck:
How do I get R2HTML to produce the same number format?
Particularly remove the decimal places for Par and Sal.
Are there better methods to produce this type of report?
Thanks,
L.A.
R version 2.10.0 XP
2012 Mar 12
1
No sound in Counter Strike 1.6
Hi,
In the first instance, sorry for my english futile. I'm from Brazil, and I'm starting in english. [Embarassed]
Well, I use Debian Squeeze, and I installed the Wine for play Counter Strike 1.6. The game run normally, but whitout sound. In winecfg there not a option for modify the sound driver for alsa or OSS. How a picture is worth a thousand words, following a print:
[Image:
2011 Nov 29
2
aggregate syntax for grouped column means
I am calculating the mean of each column grouped by the variable 'id'.
I do this using aggregate, data.table, and plyr. My aggregate results
do not match the other two, and I am trying to figure out what is
incorrect with my syntax. Any suggestions? Thanks.
Here is the data.
myData <- structure(list(var1 = c(31.59, 32.21, 31.78, 31.34, 31.61, 31.61,
30.59, 30.84, 30.98, 30.79, 30.79,
2010 Feb 09
1
Superimpose ksmooth() onto barplot
I'd like to superimpose a ksmooth() onto a barplot().
My data is:
> d
2009-06-20 2009-06-21 2009-06-22 2009-06-23 2009-06-24
2009-06-25 2009-06-26 2009-06-27 2009-06-28 2009-06-29 2009-06-30
2009-07-01 2009-07-02
Same Breed (B) 12.64 21.08 13.52 12.51
13.71 9.91 14.24 7.18 11.81 5.92
12.04 17.96
2011 May 16
2
wireframe advice - with reproducible code
Dear List,
i am trying to produce a 3d plot using wireframe using the code:
wireframe(Residuals_FD ~ Elevation * Temperature, data = data2, scales = list(arrows = FALSE), drape = TRUE, colorkey = TRUE)
As you can see when the code (using the data below) is run the plot area is set-up correctly but the actual surface is missing?
Any help would be greatly appreciated.
Chris
#data
Elevation
2006 Sep 18
2
problems in sourcing R script
Dear list,
First my information:
platform i386-pc-linux-gnu
arch i386
os linux-gnu
system i386, linux-gnu
status
major 2
minor 3.1
year 2006
month 06
day 01
svn rev 38247
language R
version.string Version 2.3.1 (2006-06-01)
Now my question:
How is it possible that a command in an R script is not
2005 Jun 22
0
Rsquare from glmmPQL or another GLMM?
Hi,
I know that Rsquare in glm or in non-linear models is "wrong", but some people
like this.
How I make to estimate the Rsquare from a model ajusted with glmmPQL or
another GLMM?
Thanks for all
Ronaldo
--
A simplicidade ?? o ??ltimo degrau da sabedoria.
-- Victor Hugo
--
|> // | \\ [***********************************]
| ( ?? ?? ) [Ronaldo Reis J??nior
2011 Jul 13
1
max possible rsquare
Dear all,
I have a question regarding the output of the coxph function. What does the
'max possible' exactly mean in the output below? Many thanks.
coef exp(coef) se(coef) robust se z Pr(>|z|)
smocc_zyban -0.4384 0.6451 0.8667 0.9473 -0.463 0.644
self 1.1857 3.2728 0.1405 0.1443 8.216 2.22e-16 ***
smocc_zyban:self
2003 Aug 27
1
how to calculate Rsquare
I think you've badly misinterpreted the purpose
of the R listserv with this request:
https://www.stat.math.ethz.ch/mailman/listinfo/r-help says
"The `main' R mailing list, for announcements about the
development of R and the availability of new code, questions
and answers about problems and solutions using R, enhancements
and patches to the source code and documentation of R,
2003 Jul 21
1
how to calculate Rsquare
Hi,
I have something like this:
> x <- 1:10
> y2 <- 30+5*x+rnorm(x,sd=3)
> y <- c(y1,y2)
> x <- c(x,x)
> plot(x,y)
> x <- 1:10
> y1 <- 1+5*x+rnorm(x,sd=2)
> y2 <- 30+5*x+rnorm(x,sd=5)
> y <- c(y1,y2)
> x <- c(x,x)
> f <- factor(rep(c("a","b"),c(10,10)))
> m <- lm(y~x+f)
> anova(m)
Analysis of Variance
2007 Sep 13
5
statistics - hypothesis testing question
I estimate two competing simple regression models, A and B where the LHS
is the same in both cases but the predictor is different (
I handle the intercept issue based on other postings I have seen ). I
estimate the two models on a weekly basis over 24 weeks.
So, I end up with 24 RSquaredAs and 24 RsquaredBs, so essentally 2 time
series of Rsquareds. This doesn't have to be necessarily thought
2005 Feb 08
3
logistic regression
Hi,
I'm using glm function to do logistic regression and now I want to know if it
exists a kind of R-squared with this function in order to check the model.
Thank you.
2004 Nov 20
1
annotation problems (conditional text())
Hello,
I'm trying to annotate my plots nicely and am running into trouble.
This example contains two problems:
a) the 'text()' arguments do not show the conditional behavior I'm
trying to give them. I try to test for the intercept of my regression
and reformat the output accordingly ('+ intercept' in the >= 0 case and
'- sqrt(intercept^2)' in the other case),
2012 Jan 17
2
result numeric(0) when using variable1[which(variable2="max(variable2)"]
Dear all,
I have a question about the knowing for which row I have the max value of
one of my variables.
I calculated the Rsquared for different columns and made a list to gather
them. I unlisted this list to create a vector with this values. I want to
know for which column I have the max value of Rsquared.
The columns were always named in the same way. They always start with
results4$depth_