Description Format Source Examples
Percentage of time spent stretching in three treatments of mice. Both
condition
and treatment
code for the same variable.
A data frame with 42 observations on the following 3 variables.
a factor with levels Both
Writhing
, Isolated
, and One Writhing
a numeric vector
a
factor with levels bw
, isolated
, and ow
Langford, D.J., S.E. Crager, Z. Shehzah, S.B. Smith, S.G. Sotocinal, J.S. Levenstadt, M.L. Chande, D.J. Levitin, J.S. Mogill. 2006. Social modulation of pain as evidence for empathy in mice. Science 312: 1967-1970.
1 2 3 4 5 6 | str(MouseEmpathy)
aov.fit <- aov(percent.stretching ~ treatment, data = MouseEmpathy)
summary(aov.fit)
lm.fit <- lm(percent.stretching ~ treatment, data = MouseEmpathy)
anova(lm.fit)
|
Loading required package: nlme
Loading required package: lattice
Loading required package: grid
Loading required package: mosaic
Registered S3 method overwritten by 'mosaic':
method from
fortify.SpatialPolygonsDataFrame ggplot2
The 'mosaic' package masks several functions from core packages in order to add
additional features. The original behavior of these functions should not be affected by this.
Attaching package: ‘mosaic’
The following objects are masked from ‘package:dplyr’:
count, do, tally
The following object is masked from ‘package:Matrix’:
mean
The following object is masked from ‘package:ggplot2’:
stat
The following objects are masked from ‘package:stats’:
binom.test, cor, cor.test, cov, fivenum, IQR, median, prop.test,
quantile, sd, t.test, var
The following objects are masked from ‘package:base’:
max, mean, min, prod, range, sample, sum
'data.frame': 42 obs. of 3 variables:
$ treatment : Factor w/ 3 levels "Both Writhing",..: 1 1 1 1 1 1 1 1 1 1 ...
$ percent.stretching: num 36.7 81.1 66.7 66.7 44.4 54.4 63.3 62.2 58.9 50 ...
$ trt : Factor w/ 3 levels "bw","iso","ow": 1 1 1 1 1 1 1 1 1 1 ...
Df Sum Sq Mean Sq F value Pr(>F)
treatment 2 4041 2020.5 6.674 0.00322 **
Residuals 39 11807 302.8
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Analysis of Variance Table
Response: percent.stretching
Df Sum Sq Mean Sq F value Pr(>F)
treatment 2 4040.9 2020.46 6.6736 0.003216 **
Residuals 39 11807.4 302.75
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.