Displaying 20 results from an estimated 9000 matches similar to: "What are the return values of aov?"
2009 Sep 15
1
coefficients of aov results has less number of elements?
Hi,
I run the following commands. 'A' has 3 levels and 'B' has 4 levels.
Should there be totally 3+4 = 7 coefficients (A1, A2, A3, B1, B2, B3,
B4)?
> a=3
> b=4
> n=1000
> A = rep(sapply(1:a,function(x){rep(x,n)}),b)
> B = as.vector(sapply(sapply(1:b, function(x){rep(x,n)}), function(x){rep(x,a)}))
> Y = A + B + rnorm(a*b*n)
>
> fr =
2009 Nov 05
4
The equivalence of t.test and the hypothesis testing of one way ANOVA
I read somewhere that t.test is equivalent to a hypothesis testing for
one way ANOVA. But I'm wondering how they are equivalent. In the
following code, the p-value by t.test() is not the same from the value
in the last command. Could somebody let me know where I am wrong?
> set.seed(0)
> N1=10
> N2=10
> x=rnorm(N1)
> y=rnorm(N2)
> t.test(x,y)
Welch Two Sample t-test
data:
2009 Nov 22
1
Why F value and Pr are not show in summary() of an aov() result?
I have the following code. I'm wondering why summary() doesn't show F
value and Pr?
Rscript multi_factor.R
> a=3
> b=4
> c=5
> d=6
> e=7
>
> A=1:a
> B=1:b
> C=1:c
> D=1:d
> E=1:e
>
> X=matrix(nr=a*b*c*d*e,nc=5)
> colnames(X)=LETTERS[1:5]
>
> for(i_a in 1:a-1) {
+ for(i_b in 1:b-1) {
+ for(i_c in 1:c-1) {
+ for(i_d in 1:d-1) {
+
2009 Sep 17
2
What does model.matrix() return?
Hi,
I don't understand what the meaning of the following lines returned by
model.matrix(). Can somebody help me understand it? What can they be
used for?
attr(,"assign")
[1] 0 1 2 2
attr(,"contrasts")
attr(,"contrasts")$A
[1] "contr.treatment"
attr(,"contrasts")$B
[1] "contr.treatment"
Regards,
Peng
> a=2
> b=3
> n=4
2008 Apr 26
1
nested anova and multiple comparisons
Hello R List:
My problem is with a nested anova. I have read the r-help and it has
answered some of my questions but i still need some help on this one.
I have also posted for help on this data set before, so i apologize in
advance for any repetition.
My design is as follows:
response: Quadrat Counts (individuals per quadrat)
Explanatory: Region (3 regions)
Locations (4
2004 Jan 30
0
Two apparent bugs in aov(y~ *** -1 + Error(***)), with suggested (PR#6510)
I think there are two bugs in aov() that shows up when the right hand
side of `formula' contains both `-1' and an Error() term, e.g.,
aov(y ~ a + b - 1 + Error(c), ...). Without `-1' or `Error()' there
is no problem. I've included and example, and the source of aov()
with suggested fixes below.
The first bug (labeled BUG 1 below) creates an extra, empty stratum
inside
2004 Feb 02
0
Two apparent bugs in aov(y~ *** -1 + Error(***)), with (PR#6520)
I believe you are right, but can you please explain why anyone would want
to fit this model? It differs only in the coding from
aov(y ~ a + b + Error(c), data=test.df)
and merely lumps together the top two strata.
There is a much simpler fix: in the line
if(intercept) nmstrata <- c("(Intercept)", nmstrata)
remove the condition (and drop the empty stratum later if you
2006 Feb 16
2
MANOVA: how do I read off within and between Sum-of-Squares info from the manova result?
Hi all,
I am experimenting the function "manova" in R.
I tried it on a few data sets, but I did not understand the result:
I used "summary(manova_result)"
and "summary(manova_result, test='Wilks')"
and they gave a bunch of numbers...
But I need the Sum-of-Squares of BETWEEN and WITHIN matrices...
How do I read off from the R's manova results?
Any
2008 Mar 08
5
Non-visible functions are asterisked
Dear R-Helpers,
I suspect I'm about to ask a FAQ, but I haven't been able to find an
answer in the FAQ, AItR or an R Site Search. When I look at the methods
of summary (below) it says, "Non-visible functions are asterisked". I
looked at the help file for summary.princomp, which did not comment on
it being non-visible. I ran its help file example, which printed visible
output. I
2009 Sep 22
1
Singular model.matrix of nested designs
Hi,
I want to do ANOVA for nested designs like following. I don't
understand why the matrix (t(X) %*% X) is singular. Can somebody help
me understand it?
Regards,
Peng
> a=2
> b=3
> n=4
> A = as.vector(sapply(1:a,function(x){rep(x,b*n)}))
> B = as.vector(sapply(1:(a*b), function(x){rep(x,n)}))
> cbind(A,B)
A B
[1,] 1 1
[2,] 1 1
[3,] 1 1
[4,] 1 1
[5,] 1 2
[6,] 1 2
[7,]
2010 Feb 09
1
"1 observation deleted due to missingness" from summary() on the result of aov()
I have the R code at the end. The last command gives me "1 observation
deleted due to missingness". I don't understand what this error
message. Could somebody help me understand it and how to fix the
problem?
> summary(afit)
Df Sum Sq Mean Sq F value Pr(>F)
A 2 0.328 0.16382 0.1899 0.82727
B 3 2.882 0.96057 1.1136 0.34644
C
2009 Sep 15
2
syntax of formula
Hi,
I am looking for a complete description of the syntax of the formula
that shall be specified in, for example, aov. But I can't find a
complete description. Can somebody point to me if there is such a
resource?
Regards,
Peng
2009 Sep 14
1
Best way to extract values from an aov object ?
I'm trying to write a function to automate doing a variance analysis,
part of which involves doing some further calculations. The method I've
been using isn't very robust, if variable names change then it stops
working.
For this dummy data
> dput(assayvar,"")
structure(list(Run = structure(c(1L, 1L, 1L, 2L, 2L, 2L, 3L,
3L, 3L, 4L, 4L, 4L), .rk.invalid.fields =
1999 Jun 29
1
manova
I am using rw0641 with Windows 98. In the help for aov it states that the
formula can sepecify multiple responses for a "maov". The help doesn't give
an example, Venables and Ripley 1997:381 doesn't either. It isn't mentioned
in the scripts nor in the section R Complements nor in Rnotes. I tried
aov(c(y1,y2,y3)~x)
which seemed reasonable to me but doesn't work. How
2006 Mar 28
2
TukeyHSD for repeated measures aov ?
Hi all,
I search the archive for finding a simple
solution for using TukeyHSD with a multistratum
aov result (a repeated emasure anova). The Question have
been asked but I've found no clear answer.
res<-aov(y~Fa*Fb+Error(Subject/(Fa*Fb)) )
I think that the problem is that res is an
aovlist object instead of the "aov" object required by TukeyHSD.
Is there an easy solution to
2005 Feb 15
2
summary(aov(...)) into a string?
It doesn't print anything: the summary.aov (or summary.aovlist)
print method does.
?summary.aov tells you the structure of the objects they return.
On Tue, 15 Feb 2005, RenE J.V. Bertin wrote:
> I'd like to annotate a plot with the output of summary(aov(model)),
> ideally just with the significant effects. I don't find a means to
> redirect what that command prints into
2004 Aug 26
1
library(car) Anova() and Error-term in aov()
Dear all,
Type III SS time again. This case trying to reproduce some SPSS (type III)
data in R for a repeated measures anova with a betwSS factor included. As I
understand this list etc, if I want type III then I can do
library(car)
Anova(lm.obj, type="III")
But for the repeated measures anova, I need to include an Error-term in the
aov() call (Psychology-guide from Jonathan Baron)
2004 Aug 17
2
aov summary to matrix
Is there an easy way of converting an aov.summary into a matrix in which
the rows are the factor names and the columns are Df, Sum Sq, Mean Sq, F
value and Pr.
For example, convert
Df Sum Sq Mean Sq F value Pr(>F)
block 5 343.29 68.66 4.4467 0.015939 *
N 1 189.28 189.28 12.2587 0.004372 **
P 1 8.40 8.40 0.5441 0.474904
K
2008 Apr 30
1
Tab-delimited AOV summaries
Hello,
I am trying to print out ANOVA summaries --- as returned by summary
(aov(...))--- in tab-delimited format, either to a file or to the
console, but so far I haven't been able to figure out a solution. My
particular ANOVA has repeated measures, so it is an instance of class
aovlist. Can anyone offer any suggestions? I am relatively new to R,
so please forgive me if I am missing
1998 May 29
0
aov design questions
R developers,
I have a first attempt to make an aov function. Eventually I want to
build in Error() structure, but first I am trying to get this
presentable for balanced data with only a single stratum, just using
residual error. I am following R. M. Heiberger's Computation for the
Analysis of Designed Experiments, Wiley (1989)
I a using a wrapper (aov.bal) to call the