system_od_general: General Observation Details Function

Description Usage Arguments Value See Also

View source: R/ubiquity.r

Description

Used to calculate observation details based on cohorts created with system_define_cohort

Usage

1
system_od_general(pest, cfg, estimation = TRUE, details = FALSE)

Arguments

pest

vector of parameters to be estimated

cfg

ubiquity system object

estimation

TRUE when called during an estimation and FALSE when called to test objective function or generate observation information for plotting

details

TRUE to display information about cohorts as they are simulated (useful for debugging when passed through system_simulate_estimation_results)

Value

If estimation is TRUE then the output is a matrix of observation details of the format:

1
od$pred  = [TIME, OBS, PRED, VAR, OUTPUT, COHORT] 

The values are the observed (OBS) data, predicted values (PRED) and variance (VAR) at the given TIME. The columns OUTPUT and COHORT can be used for sorting. These should be unique numbers.

When estimation is FALSE we output od$pred is a data frame with the following headings:

1
od$pred  = [TIME, OBS, PRED, VAR, SMOOTH, OUTPUT, COHORT] 

The TIME, OBS, PRED and VAR are the same as those listed above. The SMOOTH variable is FALSE for rows that correspond to records in the dataset and TRUE when the PRED represents the smooth predictions. The OUTPUT and COHORT columns here are text values used when defining the cohorts.

Also the od$all list item is created with all of the simulation information stored for each cohort:

1
od$all = [ts.time, ts.ts1, ... ts.tsn, pred, name, cohort]

Lastly the field isgood will be set to FALSE if any problems are encountered, and TRUE if everything worked.

1
od$isgood = TRUE

See Also

system_define_cohort and system_simulate_estimation_results


ubiquity documentation built on Sept. 5, 2021, 5:15 p.m.