Description Format Source References Examples
Two measures of femur length femur.length
for each of 25
walking sticks (Timema cristinae). Note that specimen
is not coded as a factor.
A data frame with 50 observations on the following 2 variables.
a integer denoting specimen number.
a numeric vector of femur length
Nosil, P. and B.J. Crespi. 2006. Experimental evidence that predation promotes divergence in adaptive radiation. Proceedings of the National Academy of Sciences (USA) 103: 9090-9095.
http://www.sfu.ca/biology/faculty/crespi/pdfs/96-Nosil&Crespi2006PNAS.pdf
1 | demo(sec15.6)
|
Loading required package: nlme
Loading required package: lattice
Loading required package: grid
Loading required package: mosaic
Loading required package: dplyr
Attaching package: 'dplyr'
The following object is masked from 'package:nlme':
collapse
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
Loading required package: ggformula
Loading required package: ggplot2
Loading required package: ggstance
Attaching package: 'ggstance'
The following objects are masked from 'package:ggplot2':
GeomErrorbarh, geom_errorbarh
New to ggformula? Try the tutorials:
learnr::run_tutorial("introduction", package = "ggformula")
learnr::run_tutorial("refining", package = "ggformula")
Loading required package: mosaicData
Loading required package: Matrix
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.
Note: If you use the Matrix package, be sure to load it BEFORE loading mosaic.
Attaching package: 'mosaic'
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:dplyr':
count, do, tally
The following objects are masked from 'package:stats':
IQR, binom.test, cor, cor.test, cov, fivenum, median, prop.test,
quantile, sd, t.test, var
The following objects are masked from 'package:base':
max, mean, min, prod, range, sample, sum
demo(sec15.6)
---- ~~~~~~~
> data(WalkingStickFemurs)
> str(WalkingStickFemurs)
'data.frame': 50 obs. of 2 variables:
$ specimen : int 1 1 2 2 3 3 4 4 5 5 ...
$ femur.length: num 0.26 0.26 0.23 0.19 0.25 0.23 0.26 0.26 0.23 0.22 ...
> WalkingStickFemurs$specimenF <- factor(WalkingStickFemurs$specimen)
> fm <- aov(femur.length ~ specimenF, data = WalkingStickFemurs)
> summary(fm)
Df Sum Sq Mean Sq F value Pr(>F)
specimenF 24 0.05913 0.002464 6.921 4.08e-06 ***
Residuals 25 0.00890 0.000356
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
> if (require(ICC)){
+ ICCest(specimenF,
+ femur.length,
+ data = WalkingStickFemurs,
+ alpha = 0.05,
+ CI.type = "Smith")
+ }
Loading required package: ICC
$ICC
[1] 0.7475028
$LowerCI
[1] 0.5727477
$UpperCI
[1] 0.9222579
$N
[1] 25
$k
[1] 2
$varw
[1] 0.000356
$vara
[1] 0.001053917
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.