Learn R Programming

OPSR (version 1.0.1)

opsr_prepare_coefs: Prepares Coefficients for Likelihood Function

Description

Extracts the coefficients for each regime

Usage

opsr_prepare_coefs(theta, nReg)

Value

Named list of length nReg

Arguments

theta

named coefficient vector as parsed from formula interface opsr.

nReg

integer number of regimes.

Examples

Run this code
sim_dat <- opsr_simulate()
dat <- sim_dat$data
model <- ys | yo ~ xs1 + xs2 | xo1 + xo2
start <- opsr(model, dat, .get2step = TRUE)
opsr_prepare_coefs(start, 3)

Run the code above in your browser using DataLab