R version 2.15.0 (2012-03-30)
Copyright (C) 2012 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i386-apple-darwin9.8.0/i386 (32-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
Natural language support but running in an English locale
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
[R.app GUI 1.51 (6148) i386-apple-darwin9.8.0]
[Workspace restored from /Users/mweb/.RData]
[History restored from /Users/mweb/.Rhistory]
>
>
>
> library(ez)
Loading required package: car
Loading required package: MASS
Loading required package: nnet
Loading required package: ggplot2
Loading required package: lme4
Loading required package: Matrix
Loading required package: lattice
Attaching package: ‘lme4’
The following object(s) are masked from ‘package:stats’:
AIC, BIC
Loading required package: mgcv
This is mgcv 1.7-13. For overview type 'help("mgcv-package")'.
Loading required package: memoise
Loading required package: plyr
Loading required package: RCurl
Loading required package: bitops
Loading required package: reshape2
Loading required package: scales
Loading required package: stringr
> #Read in the ANT data (see ?ANT).
> data(ANT)
> head(ANT)
subnum group block trial cue flank location direction rt error
1 1 Treatment 1 1 None Neutral up left 398.6773 0
2 1 Treatment 1 2 Center Neutral up left 389.1822 0
3 1 Treatment 1 3 Double Neutral up left 333.2186 0
4 1 Treatment 1 4 Spatial Neutral up left 419.7640 0
5 1 Treatment 1 5 None Congruent up left 446.4754 0
6 1 Treatment 1 6 Center Congruent up left 338.9766 0
> ezPrecis(ANT)
Data frame dimensions: 5760 rows, 10 columns
type missing values min max
subnum factor 0 20 1 20
group factor 0 2 Control Treatment
block numeric 0 6 1 6
trial numeric 0 48 1 48
cue factor 0 4 None Spatial
flank factor 0 3 Neutral Incongruent
location factor 0 2 down up
direction factor 0 2 left right
rt numeric 0 5760 179.5972 657.6986
error numeric 0 2 0 1
> #Run an ANOVA on the mean correct RT data.
> rt_anova = ezANOVA(
+ data = ANT[ANT$error==0,]
+ , dv = .(rt)
+ , wid = .(subnum)
+ , within = .(cue,flank)
+ , between = .(group)
+ )
Using rt as value column: use value.var to override.
> #Show the ANOVA & assumption tests.
> print(rt_anova)
$ANOVA
Effect DFn DFd F p p<.05 ges
2 group 1 18 18.430592 4.377562e-04 * 0.07633358
3 cue 3 54 516.605213 1.005518e-39 * 0.89662286
4 group:cue 3 54 2.553236 6.497492e-02 0.04110445
5 flank 2 36 1350.598810 1.386546e-34 * 0.92710583
6 group:flank 2 36 8.768499 7.900829e-04 * 0.07627434
7 cue:flank 6 108 5.193357 9.938494e-05 * 0.11436699
8 group:cue:flank 6 108 6.377225 9.012515e-06 * 0.13686958
$`Mauchly's Test for Sphericity`
Effect W p p<.05
3 cue 0.7828347 0.5366835
4 group:cue 0.7828347 0.5366835
5 flank 0.8812738 0.3415406
6 group:flank 0.8812738 0.3415406
7 cue:flank 0.1737053 0.1254796
8 group:cue:flank 0.1737053 0.1254796
$`Sphericity Corrections`
Effect GGe p[GG] p[GG]<.05 HFe p[HF] p[HF]<.05
3 cue 0.8652559 1.115029e-34 * 1.0239520 1.005518e-39 *
4 group:cue 0.8652559 7.472046e-02 1.0239520 6.497492e-02
5 flank 0.8938738 3.763312e-31 * 0.9858964 3.964046e-34 *
6 group:flank 0.8938738 1.297752e-03 * 0.9858964 8.438369e-04 *
7 cue:flank 0.6022111 1.546166e-03 * 0.7721473 4.745714e-04 *
8 group:cue:flank 0.6022111 3.424499e-04 * 0.7721473 7.170939e-05 *
> #Run an ANOVA on the mean_rt data, ignoring group.
> rt_anova2 = ezANOVA(
+ data = ANT[ANT$error==0,]
+ , dv = .(rt)
+ , wid = .(subnum)
+ , within = .(cue,flank)
+ )
Using rt as value column: use value.var to override.
Note: model has only an intercept; equivalent type-III tests substituted.
> #Show the ANOVA & assumption tests.
> print(rt_anova2)
$ANOVA
Effect DFn DFd F p p<.05 ges
2 cue 3 57 477.564650 2.435084e-40 * 0.86387868
3 flank 2 38 958.640865 3.040261e-33 * 0.90297213
4 cue:flank 6 114 4.047785 1.026734e-03 * 0.08633287
$`Mauchly's Test for Sphericity`
Effect W p p<.05
2 cue 0.8670854 0.77271988
3 flank 0.9088146 0.42293876
4 cue:flank 0.1506008 0.04917243 *
$`Sphericity Corrections`
Effect GGe p[GG] p[GG]<.05 HFe p[HF] p[HF]<.05
2 cue 0.9165014 3.647676e-37 * 1.086943 2.435084e-40 *
3 flank 0.9164345 1.182224e-30 * 1.009411 3.040261e-33 *
4 cue:flank 0.6261487 6.059761e-03 * 0.799682 2.641207e-03 *
> #Run a purely between-Ss ANOVA on the mean_rt data.
> rt_anova3 = ezANOVA(
+ data = ANT[ANT$error==0,]
+ , dv = .(rt)
+ , wid = .(subnum)
+ , between = .(group)
+ )
> #Show the ANOVA & assumption tests.
> print(rt_anova3)
$ANOVA
Effect DFn DFd F p p<.05 ges
1 group 1 18 18.50661 0.0004292561 * 0.5069385
$`Levene's Test for Homogeneity of Variance`
DFn DFd SSn SSd F p p<.05
1 1 18 0.5531777 42.6997 0.2331913 0.6349885
> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: i386-apple-darwin9.8.0/i386 (32-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ez_3.0-1 stringr_0.6 scales_0.2.1 reshape2_1.2.1 RCurl_1.91-1 bitops_1.0-4.1
[7] plyr_1.7.1 memoise_0.1 mgcv_1.7-13 lme4_0.999375-42 Matrix_1.0-6 lattice_0.20-6
[13] ggplot2_0.9.1 car_2.0-12 nnet_7.3-1 MASS_7.3-17
loaded via a namespace (and not attached):
[1] colorspace_1.1-1 dichromat_1.2-4 digest_0.5.2 grid_2.15.0 labeling_0.1 munsell_0.3
[7] nlme_3.1-103 proto_0.3-9.2 RColorBrewer_1.0-5 stats4_2.15.0 tools_2.15.0
> unbData = ANT[(ANT$error==0 & ANT$subnum!=20),]
> ezANOVA(data=unbData,dv=.(rt),wid=.(subnum),between=.(group))
Warning: You have removed one or more Ss from the analysis. Refactoring "subnum" for ANOVA.
Warning: Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
Error in `colnames<-`(`*tmp*`, value = c("Effect", "DFn", "DFd", "SSn", :
'names' attribute [8] must be the same length as the vector [7]
Error in ezANOVA_main(data = data, dv = dv, wid = wid, within = within, :
The car::Anova() function used to compute results and assumption tests seems to have failed. Most commonly this is because you have too few subjects relative to the number of cells in the within-Ss design. It is possible that trying the ANOVA again with "type=1" may yield results (but definitely no assumption tests).
> ezANOVA(data=unbData,dv=.(rt),wid=.(subnum),between=.(group),type=3)
Warning: You have removed one or more Ss from the analysis. Refactoring "subnum" for ANOVA.
Warning: Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
Error in `colnames<-`(`*tmp*`, value = c("Effect", "DFn", "DFd", "SSn", :
'names' attribute [8] must be the same length as the vector [7]
Error in ezANOVA_main(data = data, dv = dv, wid = wid, within = within, :
The car::Anova() function used to compute results and assumption tests seems to have failed. Most commonly this is because you have too few subjects relative to the number of cells in the within-Ss design. It is possible that trying the ANOVA again with "type=1" may yield results (but definitely no assumption tests).
> ezANOVA(data=unbData,dv=.(rt),wid=.(subnum),between=.(group),type=2)
Warning: You have removed one or more Ss from the analysis. Refactoring "subnum" for ANOVA.
Warning: Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
Error in `colnames<-`(`*tmp*`, value = c("Effect", "DFn", "DFd", "SSn", :
'names' attribute [8] must be the same length as the vector [7]
Error in ezANOVA_main(data = data, dv = dv, wid = wid, within = within, :
The car::Anova() function used to compute results and assumption tests seems to have failed. Most commonly this is because you have too few subjects relative to the number of cells in the within-Ss design. It is possible that trying the ANOVA again with "type=1" may yield results (but definitely no assumption tests).
> ezANOVA(data=unbData,dv=.(rt),wid=.(subnum),between=.(group),type=1)
Warning: You have removed one or more Ss from the analysis. Refactoring "subnum" for ANOVA.
Warning: Data is unbalanced (unequal N per group). Make sure you specified a well-considered value for the type argument to ezANOVA().
Warning: Data are unbalanced, switching to "type=2" (see documentation in ?ezAnova)
Error in `colnames<-`(`*tmp*`, value = c("Effect", "DFn", "DFd", "SSn", :
'names' attribute [8] must be the same length as the vector [7]
Error in ezANOVA_main(data = data, dv = dv, wid = wid, within = within, :
The car::Anova() function used to compute results and assumption tests seems to have failed. Most commonly this is because you have too few subjects relative to the number of cells in the within-Ss design. It is possible that trying the ANOVA again with "type=1" may yield results (but definitely no assumption tests).
Installing ez * checking for file xxx ... OK * preparing 'ez': * checking DESCRIPTION meta-information ... OK * checking for LF line-endings in source and make files * checking for empty or unneeded directories * looking to see if a 'data/datalist' file should be added * building 'ez_4.0-0.tar.gz' ERROR packaging into .tar.gz failed Fehler: Command failed (1)