select_coef: select a subset of coefficients

View source: R/tools.R

select_coefR Documentation

select a subset of coefficients

Description

micsr objects have a rpar element which is vector of integers with names that indicates the kind of the coefficients. For example, if the 6 first coefficients are covariates parameters and the next 3 parameters that define the distribution of the errors, npar will be c(covariates = 6, vcov = 3). It has an attribute which indicates the subset of coefficients that should be selected by default. select_coef has a subset argument (a character vector) and returns a vector of integers which is the position of the coefficients to extract.

Usage

select_coef(object, subset = NA, fixed = FALSE, grep = NULL, invert = FALSE)

Arguments

object

a fitted model

subset

a character vector, the type of parameters to extract

fixed

if TRUE, the fixed parameters are selected

grep

a regular expression

invert

should the coefficients that don't match the pattern should be selected ?

Value

a numeric vector


micsr documentation built on June 8, 2025, 9:31 p.m.