Details
The PM_cycle object is both a data field within a PM_result, and itself an R6 object comprising data fields and associated methods suitable for analysis and plotting of cycle information generated during the run.
Because PM_cycle objects are automatically added to the PM_result at the end of a successful run, it is generally not necessary for users to generate PM_cycle objects themselves.
The main results are contained in the $data field,
and it is this field which is passed to the $plot and $summary methods.
You can use this $data field for custom manipulations, e.g. last <- run1$cycle$data$aic %>% tail(1).
This will report the last cycle aic.
If you are unfamiliar with the %>% pipe function, please type help("%>%", "magrittr")
into the R console and look online for instructions/tutorials in tidyverse, a
powerful approach to data manipulation upon which Pmetrics is built.
To provide a more traditional experience in R,
the $data field is also separated by list items into the other data fields within the R6 object,
e.g. mean or gamlam. This
allows you to access them in an S3 way, e.g. run1$cycle$mean if run1 is a
PM_result object.
Public fields
dataA list with the following elements, which can also be extracted by name. e.e.
run1$cycle$objective, which is equivalent torun1$cycle$data$objective. names Vector of names of the random parameters objective A tibble of -2*Log-likelihood, AIC and BIC at each cycle gamlam A tibble of cycle number and gamma or lambda at each cycle for each output equation mean A tibble of cycle number and the mean of each random parameter at each cycle, normalized to initial mean median A tibble of cycle number and the median of each random parameter at each cycle, normalized to initial median sd A tibble of cycle number and the standard deviation of each random parameter at each cycle, normalized to initial standard deviation status Status of the last cycle: "Converged", "Maximum cycles reached", or "Posterior".
Active bindings
namesVector of names of the random parameters
objectiveA tibble of -2*Log-likelihood, AIC and BIC at each cycle
gamlamA tibble of cycle number and gamma or lambda at each cycle for each output equation
meanA tibble of cycle number and the mean of each random parameter at each cycle, normalized to initial mean
medianA tibble of cycle number and the median of each random parameter at each cycle, normalized to initial median
sdA tibble of cycle number and the standard deviation of each random parameter at each cycle, normalized to initial standard deviation
statusStatus of the last cycle: "Converged", "Maximum cycles reached", or "Posterior"
Methods
Method new()
Create new object populated with cycle information
Usage
PM_cycle$new(PMdata = NULL, path = ".", ...)Method plot()
Plot method
Arguments
...Arguments passed to plot.PM_cycle
Details
See plot.PM_cycle.
Method summary()
Summary method
Arguments
...Arguments passed to summary.PM_cycle
Details
See summary.PM_cycle.
Method print()
Print method