rcp: Simulate parameters from a fitted cp model

rcpR Documentation

Simulate parameters from a fitted cp model

Description

Simulate parameters from a cpm model object, and format them as either type "survreg" or "ppersist"

Usage

rcp(n, model, type = "survreg")

Arguments

n

the number of simulation draws

model

A cpm object (which is returned from cpm)

type

The type of parameters requested. "survreg" or "ppersist"

Value

list of two matrices of n simulated l and s (if type = "survreg") or a and b (if type = "ppersist")for cells defined by the model object.

Examples

  data(wind_RP)
  mod <- cpm(formula_l = l ~ 1, data = wind_RP$CP, left = "LastPresent",
           right = "FirstAbsent"
         )
  rcp(n = 10, model = mod, type = "survreg")
  rcp(n = 10, model = mod, type = "ppersist")


ddalthorp/GenEst documentation built on June 4, 2023, 1 a.m.