Learn R Programming

fwdmsa (version 0.2)

fs.MSA.n1: Determining n1 for the Forward Search for Mokken Scale Analysis

Description

Computes $n1$ for the Forward Search for Mokken scale analysis

Usage

fs.MSA.n1(
 X,
 B,
 cutoff = default.cutoff,
 initial.subsample.size = default.initial.subsample.size,
 minsize = default.minsize,
 seed = default.seed,
 verbose = TRUE)

Arguments

X
Matrix or data frame of numeric data containing the responses of nrow(X) respondents to ncol(X) items. Each row is called an observation. Each item has $m+1$ response options $0, \ldots, m$. Other
B
Integer giving the number of Forward Searches with different initial subsamples.
cutoff
Integer, the first step of the Forward Search for which the number of unique subsamples is below the cutoff equals $n1$.
initial.subsample.size
Integer giving the size of the initial subsample. By default initial.subsample.size equals the minimum of the number of restscore groups over all items multiplied by the number of items.
minsize
Integer giving the minimum size of a rest score group. By default minsize = $N/10$ if $N \ge 500$; minsize = $N/5$ if $250 \le N < 500$; and minsize = max$(N/3,50)$ if $N < 250$
seed
Numeric; fixes the random number generation set.seed in order to control the initial subsample. Default is a randomly drawn value between 1 and 10000.
verbose
Logical, indicating whether B should be printed on the screen. If FALSE, no output is produced. The default is TRUE.

Value

  • number.unique.subsamples. The number of unique subsamples at each step of the Forward Search. n1. The first step for which the number of unique subsamples is below the cutoff.

Details

Function fs.MSA.n1 computes the required input for the forward plot (plot.fs.n1.class). Therefore, its values should be assigned to an object. B should at least be larger than cutoff, preferably B$\ge 100$. Large values of B may take much computation time.

References

Zijlstra, W. P., Van der Ark, L. A., and Sijtsma, K. (2011). Robust Mokken scale analysis by means of the forward search algorithm for outlier detection. Multivariate Behavioral Research, 46, 58-89.

See Also

plot.fs.n1.class, fs.MSA, plot.fs.class

Examples

Run this code
## Retrieve data (588 observations)
  data(acs)

# Determine n1 by running the Forward Search for Mokken scale analysis
# B=100 times 
  fwdmsa.res.n1 <- fs.MSA.n1(acs, B=100)

# Plot of number unique subsamples
  plot(fwdmsa.res.n1)

Run the code above in your browser using DataLab