View source: R/mixed_effect_class.R
mixed_effect | R Documentation |
A mixed effects model is an extension of ANOVA where there are both fixed and random effects.
mixed_effect(alpha = 0.05, mtc = "fdr", formula, ss_type = "marginal", ...)
alpha |
(numeric) The p-value cutoff for determining significance. The default is |
mtc |
(character) Multiple test correction method. Allowed values are limited to the following:
The default is |
formula |
(formula) A symbolic description of the model to be fitted. |
ss_type |
(character) Sum of squares type. Allowed values are limited to the following:
The default is |
... |
Additional slots and values passed to |
This object makes use of functionality from the following packages:
nlme
emmeans
A mixed_effect
object with the following output
slots:
f_statistic | (data.frame) The value of the calculated statistic. |
p_value | (data.frame) The probability of observing the calculated statistic if the null hypothesis is true. |
significant | (data.frame) True/False indicating whether the p-value computed for each variable is less than the threshold. |
A mixed_effect
object inherits the following struct
classes:
[mixed_effect]
>> [ANOVA]
>> [model]
>> [stato]
>> [struct_class]
Pinheiro J, Bates D, R Core Team (2023). nlme: Linear and Nonlinear Mixed Effects Models. R package version 3.1-164, https://CRAN.R-project.org/package=nlme.
Pinheiro JC, Bates DM (2000). Mixed-Effects Models in S and S-PLUS. Springer, New York. doi:10.1007/b98882 https://doi.org/10.1007/b98882.
Lenth R (2024). emmeans: Estimated Marginal Means, aka Least-Squares Means. R package version 1.10.1, https://CRAN.R-project.org/package=emmeans.
Fox J, Weisberg S (2019). An R Companion to Applied Regression, Third edition. Sage, Thousand Oaks CA. https://socialsciences.mcmaster.ca/jfox/Books/Companion/.
M = mixed_effect(
alpha = 0.05,
mtc = "fdr",
formula = y ~ x,
ss_type = "marginal")
D = iris_DatasetExperiment()
D$sample_meta$id=rownames(D) # dummy id column
M = mixed_effect(formula = y~Species+ Error(id/Species))
M = model_apply(M,D)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.