Re: [R] model.tables error from aov

2008-12-17 Thread John Vokey
In addition, your model statement is odd.  Note that within-S factor  
Type is tested with both the type I and the type II residuals, whereas  
only the latter should be used.  Try this model instead:


aov.errs.ae - aov(TrainErrs ~ idio*Type + Error(Subject/ 
Type),data=learnDat.ae)


or, for more clarity:

aov.errs.ae - aov(TrainErrs ~ idio*Type + Error(Subject 
+Subject:Type),data=learnDat.ae), which explicitly denotes the two  
error strata.


On 17-Dec-08, at 4:00 AM, r-help-requ...@r-project.org wrote:


Your design seems to be unbalanced: multistatum aov is intended for
balanced designs.  My guess is that one idio subject has two Type=1
observations: in which case try removing one of them.

On Tue, 16 Dec 2008, Harlan Harris wrote:

Hi, I'm a new R user, coming from SPSS, and without a particularly  
strong

stats background.

I've got a data set that I'd like to do a mixed-design ANOVA with. No
missing values. Here's the summary:

summary(learnDat.ae)
Type  Subjectidio struct TrainErrs 
cond
0:20   11 : 3   idio   :28   ae  :58   Min.   : 0.00
idioae   :28
2:19   12 : 3   nonidio:30   fact: 0   1st Qu.: 6.25
idiofact : 0
3:19   14 : 3  Median :11.50
nonidioae:30

  15 : 3  Mean   :13.40
  18 : 3  3rd Qu.:16.00
  2  : 3  Max.   :59.00
  (Other):40

Note that the TrainErrs column is the only numeric column, and I  
forced

everything else to be a factor. (Is that correct?)

I then do the following:

aov.errs.ae - aov(TrainErrs ~ (idio*Type) + Error(Subject/Type) +  
(idio),

learnDat.ae)

So, idio is between-subjects and Type is within-subjects. This is  
based on

examples I've found elsewhere.

summary(aov.errs.ae)

This seems to work fine:

Error: Subject
Df Sum Sq Mean Sq F value Pr(F)
idio   1179 1790.89   0.36
Type   1210 2101.05   0.32
Residuals 17   3401 200

Error: Subject:Type
Df Sum Sq Mean Sq F value Pr(F)
Type   2515 2582.44  0.103
idio:Type  2680 3403.22  0.053 .
Residuals 34   3595 106
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1





--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

-Dr. John R. Vokey

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] F values from a Repeated Measures aov

2008-04-29 Thread John Vokey

Two things:
1. the + Sex term is superfluous
2. the variable Subject needs to be a Factor, not a vector (as I  
suspect it currently is).  That is, add:

 mydata.tab$Subject=as.factor(mydata.tab$Subject)

in the preamble before the aov call, and all should be fine.


On 29-Apr-08, at 4:00 AM, [EMAIL PROTECTED] wrote:


Hi Folks,

I have repeated measures for data on association time (under 2
acoustic condtions) in male and female frogs as they grow to adulthood
(6 timepoints). Thus, two within-subject variables (Acoustic
Condition: 2 levels, Timepoint: 6 levels) and one between-subject
variable (Sex:male or female).

I am pretty sure my distributions depart from normality but I would
first like to simply run a RM anova on the data. My problem is that
when I do this I generate different values of F for my main effects
and interaction when I do the analysis in [R] and SPSS - so I don't
know which one to believe.

Here is my code in R:



mydata.tab=read.delim(mydata.txt, header=T)   #read in my data



mydata.tab$Timepoint=as.factor(mydata.tab$Timepoint)#col headings

are factors so df are correct


mydata.tab$Acx.Cond=as.factor(mydata.tab$Acx.Cond)



mydata.tab$Sex=as.factor(mydata.tab$Sex)


aov.F=aov(Targ.Assoc.Time~(Timepoint*Acx.Cond*Sex) + Error(Subject/ 
(Timepoint*Acx.Cond))+(Sex), data=mydata.tab)


#run aov where i look at the main effects of Timepoint, Acoustic
Condition and Sex as well as all the interactions therein on the
amount of time a frog spends associating with the target sound.
Include anything to do with Subject in the error term.




Does this look right for a Repeated Measures ANOVA, or am I missing
something to make it RM and that explains the large discrepancies in
my F-values between [R] and SPSS?


As soon as I get this canonical aov code figured out I want to derive
my p-values by bootstrapping my F distributions, but first I need
those canonical F's.


Thanks
-Alex

--
Alexander T Baugh
Section of Integrative Biology
Univ. of Texas at Austin C0930
Austin, TX 78712
http://darktropic.blogspot.com/




--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

-Dr. John R. Vokey

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Journal for R

2008-03-31 Thread John Vokey
Yes.  Try: Tutorials in Quantitative Methods for Psychology 
http://www.tqmp.org/ 
  (I am on the Editorial Board).

On 31-Mar-08, at 4:00 AM, [EMAIL PROTECTED] wrote:
 Hi the list

 I made up a new statistical procedure. I will publish it in a medical
 journal, but there will be only the way of using it, no calculation or
 algorithme detail.
 So is there a journal (I mean scientific journal) with selection  
 commity
 to submit an article describing the detail of a package?

 Christophe

--
Please avoid sending me Word or PowerPoint attachments.
See http://www.gnu.org/philosophy/no-word-attachments.html

-Dr. John R. Vokey

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.