File: p_value_kenward.Rd

package info (click to toggle)
r-cran-parameters 0.24.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,852 kB
  • sloc: sh: 16; makefile: 2
file content (63 lines) | stat: -rw-r--r-- 2,188 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ci_kenward.R, R/dof_kenward.R,
%   R/p_value_kenward.R, R/standard_error_kenward.R
\name{ci_kenward}
\alias{ci_kenward}
\alias{dof_kenward}
\alias{p_value_kenward}
\alias{se_kenward}
\title{Kenward-Roger approximation for SEs, CIs and p-values}
\usage{
ci_kenward(model, ci = 0.95)

dof_kenward(model)

p_value_kenward(model, dof = NULL)

se_kenward(model)
}
\arguments{
\item{model}{A statistical model.}

\item{ci}{Confidence Interval (CI) level. Default to \code{0.95} (\verb{95\%}).}

\item{dof}{Degrees of Freedom.}
}
\value{
A data frame.
}
\description{
An approximate F-test based on the Kenward-Roger (1997) approach.
}
\details{
Inferential statistics (like p-values, confidence intervals and
standard errors) may be biased in mixed models when the number of clusters
is small (even if the sample size of level-1 units is high). In such cases
it is recommended to approximate a more accurate number of degrees of freedom
for such inferential statistics. Unlike simpler approximation heuristics
like the "m-l-1" rule (\code{dof_ml1}), the Kenward-Roger approximation is
also applicable in more complex multilevel designs, e.g. with cross-classified
clusters. However, the "m-l-1" heuristic also applies to generalized
mixed models, while approaches like Kenward-Roger or Satterthwaite are limited
to linear mixed models only.
}
\examples{
\donttest{
if (require("lme4", quietly = TRUE)) {
  model <- lmer(Petal.Length ~ Sepal.Length + (1 | Species), data = iris)
  p_value_kenward(model)
}
}
}
\references{
Kenward, M. G., & Roger, J. H. (1997). Small sample inference for
fixed effects from restricted maximum likelihood. Biometrics, 983-997.
}
\seealso{
\code{dof_kenward()} and \code{se_kenward()} are small helper-functions
to calculate approximated degrees of freedom and standard errors for model
parameters, based on the Kenward-Roger (1997) approach.

\code{\link[=dof_satterthwaite]{dof_satterthwaite()}} and \code{\link[=dof_ml1]{dof_ml1()}} approximate degrees of freedom
based on Satterthwaite's method or the "m-l-1" rule.
}