
Information about a cognitive model and the data in it
information.RdGet information about a cognitive model, for example model m
npar(m)gives the number of parameters in the modelmcoef(m)gives the number of free parameters in the modelmnstim(m)gives the number of stimuli in the data that were supplied to modelmnatt(m)gives the number of attributes that each stimulus hasnobs(m)gives the number of observations in the data that the model is fitted on
Arguments
- object
An object of class
cm, i.e. a cognitive model- ...
ignored
- type
A string:
"all"counts all parameters,"free"counts the free parameters,"fix"countes the fixed parameters,"constrained"counts constrained parameters.
Examples
## Create data D and amodel
D <- data.frame(x = 1, y = 1, z = 1)
model <- bayes_beta_d(y ~ x + z, D, fix = "start")
## Get information
npar(model) # 3 parameter
#> [1] 3
coef(model) # 0 free parameter
#> NULL
nstim(model) # 1 stimulus
#> [1] 1
natt(model) # 2 attributes (x, z) of the stimulus
#> [1] 2
nobs(model) # 1 observation in the data D
#> [1] 1