make_NIW_belief_from_data | R Documentation |
Constructs an NIW_belief
or NIW_ideal_adaptor
object,
representing Normal-Inverse Wishart (NIW) parameters for all categories found in the data. This object can be used
as a prior for functions like update_NIW_beliefs_incrementally
.
make_NIW_belief_from_data(
data,
group = NULL,
category = "category",
cues,
kappa = nu,
nu = length(cues) + 2,
verbose = F
)
make_NIW_prior_from_data(
data,
group = NULL,
category = "category",
cues,
kappa = nu,
nu = length(cues) + 2,
verbose = F
)
make_NIW_ideal_adaptor_from_data(
data,
group = NULL,
category = "category",
cues,
kappa = nu,
nu = length(cues) + 2,
...,
verbose = F
)
data |
The tibble or data.frame from which to construct the prior. |
group |
Optionally, one or more grouping variables can be specified. If group is not NULL, one NIW_belief or
ideal adaptor will be derived for each level of |
category |
Name of variable in |
cues |
Name(s) of variables in |
kappa |
The strength of the beliefs over the category mean (pseudocounts). (default: same as nu) |
nu |
The strength of the beliefs over the category covariance matrix (pseudocounts). (default: number of cues + 2) |
verbose |
If true provides more information. (default: FALSE) |
prior |
Optionally specify a prior probability for each category (in each group). (default: a uniform prior over all categories). |
lapse_rate |
Optionally specify a lapse rate. (default: |
lapse_bias |
Optionally specify a lapse bias. (default: |
Sigma_noise |
Optionally specify a (multivariate Gaussian) covariance matrix of perceptual noise. This argument will be ignored if NULL. (default: NULL) |
Currently, make_NIW_prior_from_data()
does not infer kappa or nu, nor does it fit hierarchical data. Rather
the function simply estimates the category mean and covariance matrix from the sample (data
), assumes them
to be the expected category mean (mu) and covariance (Sigma), and derives the m and S parameters
of the NIW from mu and Sigma based on the user-provided kappa and nu. That means m = mu and S = Sigma * (nu - D -1),
where D is the dimensionality of the data.
A tibble that is an NIW_belief or NIW_ideal_adaptor object.
TBD
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.