| print.pd_mapping | R Documentation |
Provides standard ways to print analysis summaries, draw stored plots, and
select rows or columns from data prepared by DataStandard(). Plotting a
result does not refit its model.
## S3 method for class 'pd_mapping'
print(x, ...)
## S3 method for class 'pd_data_check'
print(x, ...)
## S3 method for class 'pd_data'
x[...]
## S3 method for class 'pd_hte_timevarying'
print(x, ...)
## S3 method for class 'pd_hte_pooled'
print(x, ...)
## S3 method for class 'PSDiag'
print(x, ...)
## S3 method for class 'PrinSDiag'
print(x, ...)
## S3 method for class 'odds_ratios'
print(x, ...)
## S3 method for class 'QR'
print(x, ...)
## S3 method for class 'SA'
print(x, ...)
## S3 method for class 'pd_hte_timevarying'
plot(x, ...)
## S3 method for class 'pd_hte_pooled'
plot(x, ...)
## S3 method for class 'PSDiag'
plot(x, ...)
## S3 method for class 'PrinSDiag'
plot(x, ...)
## S3 method for class 'odds_ratios'
plot(x, ...)
x |
An object returned by a PDRobust function. For |
... |
For subsetting, arguments passed to the next |
Subsetting preserves the stored information but does not check the
data again. Before analyzing subsetted or edited data, validate them because
removing rows or columns can break the required longitudinal structure.
QR() has a print method but no package-specific plot method.
Print methods show the main result and invisibly return x. When a
result contains a plot, printing also draws it; SA draws all stored
sensitivity plots. Plot methods invisibly return the stored ggplot
object. Subsetting returns the selected data and preserves its PDRobust
mapping and preparation information when the result remains a data frame.
data("BiSample", package = "PDRobust")
map <- Mapping(
id = "id", time = "time", treatment = "A", survival = "S", outcome = "Y",
baseline_time = 0, cutoff_time = 2,
covariates = c("X1", "X2", "X4"),
interest_vars = c("X1", "X2"), y_type = "B"
)
print(map)
print(DataCheck(BiSample, map))
prepared <- DataStandard(BiSample, map)
prepared[1:3, ]
diagnostic <- PSDiag(prepared, A ~ X1 + X2 + X4)
print(diagnostic)
p <- plot(diagnostic)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.