File: EAPscores.Rd

package info (click to toggle)
r-cran-rpf 1.0.11%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,484 kB
  • sloc: cpp: 5,364; sh: 114; ansic: 41; makefile: 2
file content (93 lines) | stat: -rw-r--r-- 3,955 bytes parent folder | download | duplicates (3)
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/util.R
\name{EAPscores}
\alias{EAPscores}
\title{Compute Expected A Posteriori (EAP) scores}
\usage{
EAPscores(grp, ..., compressed = FALSE)
}
\arguments{
\item{grp}{a list containing the model and data. See the details section.}

\item{...}{Not used.  Forces remaining arguments to be specified by name.}

\item{compressed}{output one score per observed data row even when freqColumn is set (default FALSE)}
}
\description{
If you have missing data then you must specify
\code{minItemsPerScore}.  This option will set scores to NA when
there are too few items to make an accurate score estimate.  If
you are using the scores as point estimates without considering
the standard error then you should set \code{minItemsPerScore} as
high as you can tolerate. This will increase the amount of missing
data but scores will be more accurate. If you are carefully
considering the standard errors of the scores then you can set
\code{minItemsPerScore} to 1. This will mimic the behavior of most
other IFA software wherein scores are estimated if there is at
least 1 non-NA item for the score. However, it may make more sense
to set \code{minItemsPerScore} to 0. When set to 0, all NA rows
are scored to the prior distribution.
}
\details{
Output is not affected by the presence of a \code{weightColumn}.
}
\section{Format of a group}{


A model, or group within a model, is represented as a named list.
\describe{
\item{spec}{list of response model objects}
\item{param}{numeric matrix of item parameters}
\item{free}{logical matrix of indicating which parameters are free (TRUE) or fixed (FALSE)}
\item{mean}{numeric vector giving the mean of the latent distribution}
\item{cov}{numeric matrix giving the covariance of the latent distribution}
\item{data}{data.frame containing observed item responses, and optionally,
weights and frequencies}
\item{score}{factors scores with response patterns in rows}
\item{weightColumn}{name of the data column containing the numeric row weights (optional)}
\item{freqColumn}{name of the data column containing the integral row frequencies (optional)}
\item{qwidth}{width of the quadrature expressed in Z units}
\item{qpoints}{number of quadrature points}
\item{minItemsPerScore}{minimum number of non-missing items when estimating factor scores}
}

The \code{param} matrix stores items parameters by column. If a
column has more rows than are required to fully specify a model
then the extra rows are ignored.  The order of the items in
\code{spec} and order of columns in \code{param} are assumed to
match. All items should have the same number of latent dimensions.
Loadings on latent dimensions are given in the first few rows and
can be named by setting rownames. Item names are assigned by
\code{param} colnames.

Currently only a multivariate normal distribution is available,
parameterized by the \code{mean} and \code{cov}. If \code{mean} and
\code{cov} are not specified then a standard normal distribution is
assumed. The quadrature consists of equally spaced points. For
example, \code{qwidth=2} and \code{qpoints=5} would produce points
-2, -1, 0, 1, and 2. The quadrature specification is part of the
group and not passed as extra arguments for the sake of
consistency. As currently implemented, OpenMx uses EAP scores to
estimate latent distribution parameters. By default, the exact same
EAP scores should be produced by \link{EAPscores}.
}

\examples{
spec <- list()
spec[1:3] <- list(rpf.grm(outcomes=3))
param <- sapply(spec, rpf.rparam)
data <- rpf.sample(5, spec, param)
colnames(param) <- colnames(data)
grp <- list(spec=spec, param=param, data=data, minItemsPerScore=1L)
EAPscores(grp)
}
\seealso{
Other scoring: 
\code{\link{bestToOmit}()},
\code{\link{itemOutcomeBySumScore}()},
\code{\link{observedSumScore}()},
\code{\link{omitItems}()},
\code{\link{omitMostMissing}()},
\code{\link{sumScoreEAP}()}
}
\concept{scoring}