GenEst (version 1.4.5)

rcp: 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

Run this code
# NOT RUN {
  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")

# }

Run the code above in your browser using DataCamp Workspace