| observed {tidyvpc} | R Documentation |
Specify observed dataset and variables for VPC
Description
The observed function is the first function in the vpc piping chain and is used for specifying observed data and variables for VPC. Note: Observed
data must not contain missing DV and may require filtering MDV == 0 before generating VPC.
Usage
observed(o, ...)
## S3 method for class 'data.frame'
observed(
o,
x,
yobs,
pred = NULL,
blq = NULL,
lloq = -Inf,
alq = NULL,
uloq = Inf,
...
)
Arguments
o |
A |
... |
Other arguments. |
x |
Numeric x-variable, typically named TIME. |
yobs |
Numeric y-variable, typically named DV. |
pred |
Population prediction variable, typically named PRED. |
blq |
Logical variable indicating below limit of quantification. |
lloq |
Number or numeric variable in data indicating the lower limit of quantification. |
alq |
Logical variable indicating above limit of quantification . |
uloq |
Number or numeric variable in data indicating the upper limit of quantification. |
Value
A tidyvpcobj containing both original data and observed data formatted with x and y variables as specified in function.
Resulting data is of class data.frame and data.table.
See Also
simulated censoring stratify predcorrect binning binless vpcstats
Examples
obs_data <- obs_data[MDV == 0]
sim_data <- sim_data[MDV == 0]
vpc <- observed(obs_data, x=TIME, y=DV)