% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dimensionality.R
\name{dimensionality_magnitude}
\alias{dimensionality_magnitude}
\title{Magnitude of multidimensionality from a subtest analysis}
\usage{
dimensionality_magnitude(fit, subtests)
}
\arguments{
\item{fit}{A fitted object from \code{\link{rasch}}.}

\item{subtests}{A list of character vectors assigning \emph{every} item
of the fit to one subscale (at least two subscales of two or more
items). Unequal subscale sizes use their mean as \eqn{K}.}
}
\value{
A list of class \code{"rasch_dim_magnitude"}: the comparison
  \code{table} (rows PSI and alpha; columns \code{run1}, \code{subtest},
  \code{c2}, \code{c}, \code{rho}, \code{A}), the subtest \code{refit},
  and the design constants \code{S} and \code{K}.
}
\description{
Estimates how strongly two or more hypothesised subscales measure
distinct traits, by Andrich's (2016) comparison of two reliability
calculations: one treating all items as independent (which inflates
reliability under multidimensionality) and one on the subtest analysis
in which each subscale is combined into a single polytomous super-item
(which absorbs the unique subscale variance). Under the bifactor
formalisation \eqn{\beta_{ns} = \beta_n + c\,\beta'_{ns}} (Marais and
Andrich 2008), with \eqn{S} subscales of \eqn{K} items,
\deqn{c^2 = S\,(r_1/r_2 - 1) \frac{SK - 1}{S(K - 1)},}
the latent correlation between subscales is \eqn{\rho = 1/(1 + c^2)},
and \eqn{A = S/(S + c^2)} is the proportion of common (non-unique,
non-error) variance. Both the person separation index and coefficient
alpha versions are reported (Andrich and Marais 2019, ch. 24).
}
\examples{
set.seed(1); N <- 500
common <- rnorm(N); u1 <- rnorm(N); u2 <- rnorm(N)
d <- rep(seq(-1, 1, length.out = 5), 2)
X <- sapply(1:10, function(i) rbinom(N, 1,
  plogis(common + 0.8 * (if (i <= 5) u1 else u2) - d[i])))
colnames(X) <- paste0("I", 1:10)
fit <- rasch(X)
dimensionality_magnitude(fit,
  list(paste0("I", 1:5), paste0("I", 6:10)))$table
}
\references{
Andrich, D. (2016). Components of variance of scales with a
  bifactor structure from two calculations of coefficient alpha.
  Educational Measurement: Issues and Practice, 35(4), 25-30.
}
