-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmeasrfit.Rd
106 lines (91 loc) · 3.31 KB
/
measrfit.Rd
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
94
95
96
97
98
99
100
101
102
103
104
105
106
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/measrfit-class.R
\name{measrfit}
\alias{measrfit}
\title{Create a \code{measrfit} object}
\usage{
measrfit(
data = list(),
type = character(),
prior = default_dcm_priors(type = type),
stancode = character(),
method = character(),
algorithm = character(),
backend = character(),
model = NULL,
respondent_estimates = list(),
fit = list(),
criteria = list(),
reliability = list(),
file = NULL,
version = list(),
class = character()
)
}
\arguments{
\item{data}{The data and Q-matrix used to estimate the model.}
\item{type}{The type of \acronym{DCM} that was estimated.}
\item{prior}{A \link[=measrprior]{measrprior} object containing information on
the priors used in the model.}
\item{stancode}{The model code in \emph{Stan} language.}
\item{method}{The method used to fit the model.}
\item{algorithm}{The name of the algorithm used to fit the model.}
\item{backend}{The name of the backend used to fit the model.}
\item{model}{The fitted Stan model. This will object of class
\link[rstan:stanfit-class]{rstan::stanfit} if \code{backend = "rstan"} and
\href{https://mc-stan.org/cmdstanr/reference/CmdStanMCMC.html}{\code{CmdStanMCMC}}
if \code{backend = "cmdstanr"} was specified when fitting the model.}
\item{respondent_estimates}{An empty list for adding estimated person
parameters after fitting the model.}
\item{fit}{An empty list for adding model fit information after fitting the
model.}
\item{criteria}{An empty list for adding information criteria after fitting
the model.}
\item{reliability}{An empty list for adding reliability information after
fitting the model.}
\item{file}{Optional name of a file which the model objects was saved to
or loaded from.}
\item{version}{The versions of measr, \emph{Stan}, and rstan or cmdstanr that were
used to fit the model.}
\item{class}{Additional classes to be added (e.g., \code{measrdcm} for a
diagnostic classification model).}
}
\value{
A \code{\link[=measrfit-class]{measrfit}} object.
}
\description{
Models fitted with \code{\link{measr}} are represented as a \code{measrfit} object. If a
model is estimated with \emph{Stan}, but not \code{\link{measr}}, a \code{measrfit} object can be
created in order to access other functionality in measr (e.g., model fit,
reliability).
}
\examples{
\dontshow{if (measr_examples()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf}
rstn_mdm_lcdm <- measr_dcm(
data = mdm_data, missing = NA, qmatrix = mdm_qmatrix,
resp_id = "respondent", item_id = "item", type = "lcdm",
method = "optim", seed = 63277, backend = "rstan"
)
new_obj <- measrfit(
data = rstn_mdm_lcdm$data,
type = rstn_mdm_lcdm$type,
prior = rstn_mdm_lcdm$prior,
stancode = rstn_mdm_lcdm$stancode,
method = rstn_mdm_lcdm$method,
algorithm = rstn_mdm_lcdm$algorithm,
backend = rstn_mdm_lcdm$backend,
model = rstn_mdm_lcdm$model,
respondent_estimates = rstn_mdm_lcdm$respondent_estimates,
fit = rstn_mdm_lcdm$fit,
criteria = rstn_mdm_lcdm$criteria,
reliability = rstn_mdm_lcdm$reliability,
file = rstn_mdm_lcdm$file,
version = rstn_mdm_lcdm$version,
class = "measrdcm"
)
\dontshow{\}) # examplesIf}
}
\seealso{
See \code{\linkS4class{measrfit}}, \code{\link[=as_measrfit]{as_measrfit()}}, \code{\link[=is_measrfit]{is_measrfit()}}.
}
\concept{Stan}