Details
The PM_cov 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 relationships between covariates and posterior parameters, covariates over time, or parameter values over time.
Because PM_cov 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_cov objects themselves.
The 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, although usually this
is better done on the summary object, e.g.,
run1$cov$summary() %>% select(africa, gender) %>% table().
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.
This output of this function is suitable for exploration of covariate- parameter, covariate-time, or parameter-time relationships.
Public fields
dataA data frame with the following columns
id Subject identification
time Times of covariate observations
covnames... Columns with each covariate observations in the dataset for each subject and
timeparnames... Columns with each parameter in the model and the
icensummary for each subject, replicated as necessary for covariate observation times and duplicated for Bayesian parameter means and mediansicen The type of summarized Bayesian posterior individual parameter values: mean or median
Methods
Method new()
Create new object populated with covariate-parameter information
Usage
PM_cov$new(PMdata = NULL, path = ".", ...)Method step()
Stepwise linear regression of covariates and Bayesian posterior parameter values
Arguments
...Arguments passed to PM_step
Details
See PM_step.
Method summary()
Summary method
Arguments
...Arguments passed to summary.PM_cov
Details
See summary.PM_cov.