\(X_i\) = independent variable(s) (there may be many)
\(B_0\) = model intercept, the overall mean of \(Y\)
\(B_1\) = how \(Y\) changes with \(X\)
\(\epsilon_i\) = model residual, the gap between the predicted value for \(Y_i\) and its observed value
The Expected Value, \(E(Y)\)
<<<<<<< HEAD
“least squares means”, “estimated marginal means”, “best linear unbiased linear estimates” (BLUEs)
estimating these is often a goal of an experiment and analysis
=======
Synonyms: “least squares means”, “estimated marginal means”, “best linear unbiased linear estimates” (BLUEs)
Estimating these is often a goal of an experiment and analysis
>>>>>>> d974ee02258697f9fa308a6b3a176cbadee17a89
It is a function of the model parameters
\[\hat{Y_{i}} = \beta_0 + \beta_i X\]
\[SE(Y_i) = \mathbf{X \Sigma X^T}\]
\(\mathbf{X}\) = design matrix for X.
\(\mathbf{\Sigma}\) = variance-covariance matrix for fixed effects, \(\mathbf{\beta}\)
<<<<<<< HEAD
Estimates & Hypothesis Statements
It helps an analysis to have specific hypothesis statements
Examples:
How much does an this cattle feed increase weight gain among calves < 1 year old?
How many nematodes eggs ar produced in each of these genotypes and which ones differ from the control genotypes?
=======
Estimates & Hypothesis Statements
It helps an analysis to have specific questions or goals.
Examples:
How much does a type of cattle feed increase weight gain among calves < 1 year old?
How many nematodes eggs are produced in each of these crop varieties and which ones differ from the control variety?
>>>>>>> d974ee02258697f9fa308a6b3a176cbadee17a89
Does grain yield increase by at least 2 units as a result of 10 years of reduced tillage?
How far do I need to sample in a field to achieve spatial independence?
Confidence Interval
[A confidence interval percentage] is the frequency with which other unobserved intervals will contain the true effect….if all the assumptions used to compute the intervals were correct.
The confidence level instead reflects the long-run reliability of the method used to generate the interval….if the same sampling procedure were repeated 100 times from the same population, approximately 95 of the resulting intervals would be expected to contain the true population mean. The frequentist approach sees the true population mean as a fixed unknown constant, while the confidence interval is calculated using data from a random sample.
…a p-value is the probability under a specified statistical model that a statistical summary of the data (e.g., the sample mean difference between two compared groups) would be equal to or more extreme than its observed value.
Note: for this and all other analyses in this presentation, the data and model inspected in previous lectures and found to meet linear model assumptions of normality, homoscedasticity and independence.
*Note: for this and all other analyses in this presentation, the data and model inspected in previous lectures and found to meet linear model assumptions of normality, homoscedasticity and independence.
Estimates Example: Whitepine
ANOVA
joint_tests(m1)
model term df1 df2 F.ratio p.value
male 3 81 20.546 <0.0001
female 6 81 5.403 <0.0001
male:female 18 81 3.731 <0.0001
Estimates Example: Whitepine
Main effects
(wp_emm1 <-emmeans(m1, ~ male))
=======
Note: for this and all other analyses in this presentation, the data and model inspected in previous lectures and found to meet linear model assumptions of normality, homoscedasticity and independence.
Estimates Example: white pine
ANOVA
anova(m1)
Type III Analysis of Variance Table with Satterthwaite's method
Sum Sq Mean Sq NumDF DenDF F value Pr(>F)
male 12.3538 4.1179 3 81 20.5460 5.393e-10 ***
female 6.4977 1.0829 6 81 5.4032 9.740e-05 ***
male:female 13.4609 0.7478 18 81 3.7312 2.266e-05 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Estimates Example: white pine
Main effects
(wp_emm1 <-emmeans(m1, ~ male)) # print out, same as summary()
>>>>>>> d974ee02258697f9fa308a6b3a176cbadee17a89
male emmean SE df lower.CL upper.CL
M17 3.80 0.104 11.5 3.58 4.03
M19 2.91 0.104 11.5 2.68 3.14
M22 3.57 0.104 11.5 3.34 3.80
M58 3.31 0.104 11.5 3.08 3.54
Results are averaged over the levels of: female
Degrees-of-freedom method: kenward-roger
Confidence level used: 0.95
Pairwise is possible, but with 28 levels (7 female * 4 male parents) that will be very messy since that means 378 total contrasts. Note that functions for compact letter display, e.g. multcomp::cld(), are doing this in order to generate letters.
For the whitepine example, there may be no need to conduct hypothesis tests, getting the estimates may be enough for parental selection.
Pairwise is possible, but with 28 levels (7 female * 4 male parents) that will be very messy since that means 378 total contrasts. Note that functions for compact letter display, e.g. multcomp::cld(), are doing this in order to generate letters.
For the white pine example, there may be no need to conduct hypothesis tests, getting the estimates may be enough for parental selection.
>>>>>>> d974ee02258697f9fa308a6b3a176cbadee17a89
Contrasts
Major Contrast Types
Pairwise
Consecutively pairwise between ordered levels
To a reference level
To a constant
Custom
<<<<<<< HEAD
In most cases, the only way to know if two things are different is to conduct a contrast.
Contrasts
Pairwise contrasts
=======
In most cases, the only way to know if two things are different is to conduct a contrast.
trt emmean SE df lower.CL upper.CL .group
F12 5.75 3.35 25 -1.15 12.7 A
F3 9.50 3.35 25 2.60 16.4 A
S12 14.25 3.35 25 7.35 21.2 AB
F6 15.50 3.35 25 8.60 22.4 AB
S3 16.75 3.35 25 9.85 23.7 AB
S6 18.25 3.35 25 11.35 25.2 AB
O 22.62 2.37 25 17.74 27.5 B
Confidence level used: 0.95
P value adjustment: tukey method for comparing a family of 7 estimates
significance level used: alpha = 0.1
=======
zone = low:
nitro emmean SE df lower.CL upper.CL .group
0 3.47 0.354 66 2.76 4.17 A
80 6.27 0.354 66 5.57 6.98 B
100 6.91 0.354 66 6.20 7.62 BC
140 6.93 0.354 66 6.23 7.64 BC
180 7.13 0.354 66 6.42 7.84 BC
120 7.37 0.354 66 6.66 8.08 BC
160 7.81 0.354 66 7.10 8.52 BC
220 7.92 0.354 66 7.21 8.62 BC
260 8.06 0.354 66 7.35 8.77 C
200 8.06 0.354 66 7.35 8.77 C
240 8.28 0.354 66 7.57 8.99 C
Confidence level used: 0.95
P value adjustment: tukey method for comparing a family of 11 estimates
significance level used: alpha = 0.05
>>>>>>> d974ee02258697f9fa308a6b3a176cbadee17a89
NOTE: If two or more means share the same grouping symbol,
then we cannot show them to be different.
But we also did not show them to be the same.
Equivalence Testing
Are these the same?
<<<<<<< HEAD
A user sets a threshold, a quantativie difference between two treatment levels, that is scientifically not important. This is a value judgement informed by domain knowledge.
=======
A user sets a threshold, a quantitative difference between two treatment levels, where a difference equal to that vaue or less is scientifically not meaninful. This is a value judgement informed by domain knowledge.
>>>>>>> d974ee02258697f9fa308a6b3a176cbadee17a89
A hypothesis test is conducted to evaluate if two things differ by more than the predetermined threshold.
The null hypothesis is that two means are equivalent and the alternative hypothesis is that they are not.
This test provides some answers to the long-desired and frequently unanswered question “are these things the same”?
Equivalence Testing
Pairs example:
<<<<<<< HEAD
test(pairs(wp_emm1), delta =0.5, side =2)
=======
test(pairs(wp_emm1), delta =0.5, side =2)
>>>>>>> d974ee02258697f9fa308a6b3a176cbadee17a89
contrast estimate SE df t.ratio p.value
M17 - M19 0.895 0.12 81 3.298 1.0000
M17 - M22 0.234 0.12 81 -2.221 0.0844
M17 - M58 0.496 0.12 81 -0.033 0.9818
M19 - M22 -0.660 0.12 81 1.340 1.0000
M19 - M58 -0.399 0.12 81 -0.848 0.7370
M22 - M58 0.262 0.12 81 -1.991 0.1406
Results are averaged over the levels of: female
Degrees-of-freedom method: kenward-roger
P value adjustment: sidak method for 6 tests
Statistics are tests of equivalence with a threshold of 0.5
P values are left-tailed
<<<<<<< HEAD
=======
High p-values favor differences that are greater than 0.5
>>>>>>> d974ee02258697f9fa308a6b3a176cbadee17a89
Equivalence Testing
Compare to mean example
The means are compared to the overall mean and differences less than 0.5 are tested.
<<<<<<< HEAD
In this instance, low p-values favor observations that are greater than 0.5 and are not equivalent to the overall mean or within 0.5 units of it.
The estimated marginal means are the mathematical products of the coefficients determined during model fitting; they are a summary term for each level of a fixed effect.
Think carefully about contrasts to conduct. What questions do you want answered?
<<<<<<< HEAD
Avoid using CLD if you can because it substantial reduces statistical power.
Consider other options: compare to a reference, compare to the mean, compare to a value, conduct equivalance tests.
=======
Avoid using CLD if you can because it substantially reduces statistical power.
Consider other options to CLD: compare to a reference, compare to the mean, compare to a value, conduct equivalence tests.
>>>>>>> d974ee02258697f9fa308a6b3a176cbadee17a89
When an interaction is present, explore that first before looking at main effects.
Explore ‘emmeans’ documentation (help files, vignettes) to see the full suite of functionality.
The scientific method is the most rigorous path to knowledge, but it’s also messy and tough. Science [Statistics] deserves respect exactly because it is difficult — not because it gets everything correct on the first try. The uncertainty inherent in science doesn’t mean that we can’t use it to make important policies or decisions. It just means that we should remain cautious and adopt a mindset that’s open to changing course if new data arises. We should make the best decisions we can with the current evidence and take care not to lose sight of its strength and degree of certainty. It’s no accident that every good paper includes the phrase “more study is needed” — there is always more to learn.