powered by
Gets the number of parameters of an object.
The default methods returns the length of pars() if none are NA, otherwise it returns NA.
pars()
NA
# S3 method for term npars(x, scalar = NULL, ...)
An integer scalar of the number of parameters.
An object.
A flag specifying whether to by default return all parameters (NULL), or only scalar parameters (TRUE) or only non-scalar parameters (FALSE).
Other arguments passed to methods.
Other MCMC dimensions: nchains(), niters(), nsams(), nsims(), nterms()
nchains()
niters()
nsams()
nsims()
nterms()
Other parameters: pars(), set_pars()
set_pars()
npars(term("sigma", "alpha[1]", "alpha[2]", "beta[1,1]", "beta[2,1]"))
Run the code above in your browser using DataLab