For the data from Allison and Cicchetti (1976), the two variables of
interest, brain weight and body weight, will be treated as random with
the focus on estimating the regression slope of the linear relationship
between two random variables. The original variables were
log-transformed, with both variables having strongly skewed
distributions due to a small number of large-bodied (and large-brained)
species.
Allison, T. & Cicchetti, D. V. (1976). Sleep in mammals:
ecological and constitutional correlates. Science, 194,
732-4.
Data for this example were obtained for the first edition and are
available here
Preliminaries
First, load the required packages (lmodel2)
Import allison data file (allison.csv)
allison <- read.csv("../data/allison.csv")
head(allison,10)
Transform bodywt and brainwt to log10
allison$lbodywt <- log10(allison$bodywt)
allison$lbrainwt <- log10(allison$brainwt)
Fit model 2 regression
allison2 <- lmodel2(lbrainwt~lbodywt, data=allison, range.y='interval', range.x='interval', nperm=1000)
allison2
Model II regression
Call: lmodel2(formula = lbrainwt ~ lbodywt, data = allison, range.y = "interval", range.x = "interval", nperm = 1000)
n = 62 r = 0.9595748 r-square = 0.9207837
Parametric P-values: 2-tailed = 9.835792e-35 1-tailed = 4.917896e-35
Angle between the two OLS regression lines = 2.294966 degrees
Permutation tests of OLS, MA, RMA slopes: 1-tailed, tail corresponding to sign
A permutation test of r is equivalent to a permutation test of the OLS slope
P-perm for SMA = NA because the SMA slope cannot be tested
Regression results
Confidence intervals
Eigenvalues: 2.912129 0.05649568
H statistic used for computing C.I. of MA: 0.001345423
LS0tCnRpdGxlOiAiUUsgQm94IDYuMyIKCm91dHB1dDogCiAgaHRtbF9ub3RlYm9vazoKICAgIHRoZW1lOiBmbGF0bHkKCi0tLQoKYGBge3Igc2V0dXAsIGluY2x1ZGU9RkFMU0V9CmtuaXRyOjpvcHRzX2NodW5rJHNldChlY2hvID0gVFJVRSkKYGBgCgpGb3IgdGhlIGRhdGEgZnJvbSBBbGxpc29uIGFuZCBDaWNjaGV0dGkgKDE5NzYpLCB0aGUgdHdvIHZhcmlhYmxlcyBvZiBpbnRlcmVzdCwgYnJhaW4gd2VpZ2h0IGFuZCBib2R5IHdlaWdodCwgd2lsbCBiZSB0cmVhdGV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