As you have not provided a clue of what your models are, one can only guess.
But if you mean using lots of fixed effects vs a random effect, the answer is
that there is no such animal. They are two different non-nested models, and
should be chosen based on subject matter considerations.
Hi Chiara,
If you just want to compare model fit, you could use a LRT between
models where you do and do not estimate the variance/covariance matrix
of random effects.
R^2 in mixed models do not have the same nice properties they do in
fixed effects models.
Cheers,
Josh
On Mon, Apr 30, 2012
If you want to know if your model fit will your data, then looking at
residual-type plots is useful, as can be plotting the model-predictions and
observed data together. You might also find interesting R2 statistics for
mixed models by Matthew Kramer. Beware--as others have indicated, there
is
You came close.
Here is how it might be done:
individual - rep(c(1,1,6,8,8,9,9,9,12,12),2)
day - rep(c(4,17,12,12,17,3,9,22,13,20),2)
condition - rep(c(0.72, 0.72, 0.67, 0.73, 0.76, 0.65, 0.68, 0.78, 0.73,
0.71),2)
test - data.frame(individual, day, condition)
#ind.id - unique(test$individual)
in the result table: I want to add two columns with the information of r2 and p
value.
I hope you understand my problem. thaks for allyour help. I am learning R.
cheers
kristi
From: tal.gal...@gmail.com
Date: Sun, 29 Apr 2012 12:13:08 +0300
Subject: Re: [R] r2 and p value dispaly in table
To: kristi.glo
learning R.
cheers
kristi
--
From: tal.gal...@gmail.com
Date: Sun, 29 Apr 2012 12:13:08 +0300
Subject: Re: [R] r2 and p value dispaly in table
To: kristi.glo...@hotmail.com
CC: r-help@r-project.org
You came close.
Here is how it might be done:
individual
Addi Wei addi...@gmail.com writes:
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
I figured out the answer. Since I have both the predicted and actual values,
I simply need to call the lm function, and summary to see R^2 which matches
what MOE provided.
myline.fit -lm( y~x)
summary(myline.fit)
--
View this message in context:
Nancy -
Please notice that ** is not an R operator.
The caret (^) is the exponentiation operator in R.
- Phil
On Tue, 29 Dec 2009, Nancy Adam wrote:
Hi everyone,
I tried to write the code of computing R2 for a regression system but I failed.
This
Nancy,
There is a function in the caret package called defaultSummary that
will compute both RMSE and R2 for you.
Max
On Dec 28, 2009, at 11:51 PM, Nancy Adam nancyada...@hotmail.com
wrote:
Hi everyone,
I tried to write the code of computing R2 for a regression system
but I
** works as exponentiation for me:
3**2
[1] 9
On Tue, Dec 29, 2009 at 6:10 AM, Phil Spector spec...@stat.berkeley.edu wrote:
Nancy -
Please notice that ** is not an R operator. The caret (^) is the
exponentiation operator in R.
- Phil
On Tue, 29
Gabor Grothendieck wrote:
** works as exponentiation for me:
3**2
[1] 9
Yes, but see ?** that it is just documented in a note and has been
deprecated in S since 20 years...
Uwe Ligges
On Tue, Dec 29, 2009 at 6:10 AM, Phil Spector spec...@stat.berkeley.edu wrote:
Nancy -
Please
On Tue, 29 Dec 2009, Phil Spector wrote:
Nancy -
Please notice that ** is not an R operator. The caret (^) is the
exponentiation operator in R.
- Phil
Actually, no,
2**3
[1] 8
Indeed ^ is the preferred exponentiation operator, but ** has 'always'
me what I have to change to compute R2?
Many thanks,
Nancy
Date: Tue, 29 Dec 2009 17:28:59 +
From: rip...@stats.ox.ac.uk
To: spec...@stat.berkeley.edu
CC: nancyada...@hotmail.com; r-help@r-project.org
Subject: Re: [R] R2
On Tue, 29 Dec 2009, Phil Spector wrote:
Nancy -
Please
Hi Tom,
Take a look at the following taken/modified from ?lm:
ctl - c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt - c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
group - gl(2,10,20, labels=c(Ctl,Trt))
weight - c(ctl, trt)
lm.D9 - lm(weight ~ group)
slm - summary(lm.D9)
str(slm)
Did you read the posting guide? Your posting is not comprehensible to most of
the readers of this list, and you have not explained whether this has
anything to do with R, or any of its contributed packages; there are no
clues in included code or code snippets illustrating the problem. Your TLA
is
Hi Sarah,
From your description it sounds as though you would be best off
consulting with a statistician. Without having a clear understanding
of the research hypotheses, experimental units, how randomization was
performed, the spatial and temporal structure of the experiment, etc,
it's not
Hi Sarah,
On Jul 25, 2009, at 8:25 AM, Buckmaster, Sarah wrote:
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
G'day Glenn,
On Tue, 2 Dec 2008 12:53:44 +1100
[EMAIL PROTECTED] wrote:
I'm a little confused about the R2 and adjusted R2 values reported by
lm() when I try to fix an intercept. When using +0 or -1 in the
formula I have found that the standard error generally increases (as
I would expect)
)
Cc: r-help@r-project.org
Subject: Re: [R] r2 for lm() with zero intercept
G'day Glenn,
On Tue, 2 Dec 2008 12:53:44 +1100
[EMAIL PROTECTED] wrote:
I'm a little confused about the R2 and adjusted R2 values reported by
lm() when I try to fix an intercept. When using +0 or -1 in the
formula I
G'day Glenn,
On Tue, 2 Dec 2008 17:02:26 +1100
[EMAIL PROTECTED] wrote:
Obviously the code is functioning properly then, but do you consider
this the best way of computing R^2 for a zero intercept?
The way R does. What else would I say. ;-)
That formula compares the variance explained by
21 matches
Mail list logo