Learn R Programming

cvasi (version 1.4.0)

import_morse: Import morse model parameters

Description

Loads GUTS model parameters which were fitted by the morse package.

Usage

import_morse(
  fit,
  find_sd = TRUE,
  find_it = TRUE,
  reset_hb = TRUE,
  params = c("estim", "all"),
  mcmc_size,
  find.SD = deprecated(),
  find.IT = deprecated(),
  reset.hb = deprecated(),
  mcmc.size = deprecated(),
  file = deprecated()
)

morse(...)

Value

list of parameter_set objects

Arguments

fit

Either a string with a file path to an .Rdata or .RDS file containing a morse fit, or a morse fit object itself

find_sd

a logical value. If TRUE, it will try to find fitted parameters of a GUTS-RED-SD model

find_it

a logical value. If TRUE, it will try to find fitted parameters of a GUTS-RED-IT model

reset_hb

a logical value. If TRUE, the background hazard rate hb is set to zero

params

character, if set to "estim" then only the best-fit parameters are imported, else all parameter sets in the MCM chains are returned

mcmc_size

optional integer, sets the maximum number of imported parameter sets per MCMC. By default, all MSMS parameter samples are imported.

find.SD

deprecated, alias for parameter find_sd

find.IT

deprecated, alias for parameter find_it

reset.hb

deprecated, alias for parameter rest_hb

mcmc.size

deprecated, alias for parameter mcmc_size

file

deprecated, alias for parameter fit

...

Arguments passed on to import_morse()

Functions

  • morse(): deprecated alias

Examples

Run this code
# import all parameter fits
try(import_morse("path/to/morse_fit.RData"))

# import parameters for a specific model
try(import_morse("path/to/morse_fit.RData", find_it=TRUE, find_sd=FALSE))

# modify model objects
try(models %>% set_param(import_morse("path/to/morse_fit.RData")))

Run the code above in your browser using DataLab