npar: Number of Parameters, Attributes, and Stimuli

Description Usage Arguments Examples

View source: R/cm-methods.R

Description

npar(m) counts the parameters in a cm, nstim(m) counts stimuli, natt(m) counts attributes by stimulus, nobs(m) counts observations in the data of a model.

Usage

1
2
3
4
npar(x)

## S3 method for class 'cm'
npar(x, type = "all", ...)

Arguments

x

a model object

...

ignored

type

A string: "all" counts all parameters, "free" counts the free parameters, "fix" countes the fixed parameters, "constrained" counts constrained parameters.

Examples

1
2
3
4
D <- data.frame(x = 1, y = 1, z = 1)
M <- bayes_beta(y ~ x + z, D, fix = "start")
npar(M) # 3
npar(M)

JanaJarecki/cogscimodels documentation built on Sept. 8, 2020, 7:28 p.m.