observed | R Documentation |
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.
observed(o, ...)
## S3 method for class 'data.frame'
observed(
o,
x,
yobs,
pred = NULL,
blq = NULL,
lloq = -Inf,
alq = NULL,
uloq = Inf,
...
)
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. |
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
.
simulated
censoring
stratify
predcorrect
binning
binless
vpcstats
obs_data <- obs_data[MDV == 0]
sim_data <- sim_data[MDV == 0]
vpc <- observed(obs_data, x=TIME, y=DV)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.