simulated: observed

Description Usage Arguments Details Value See Also Examples

View source: R/vpcstats.R

Description

Specify simulated dataset and variables for VPC

Usage

1
2
3
4
simulated(o, ...)

## S3 method for class 'tidyvpcobj'
simulated(o, data, ysim, ...)

Arguments

o

tidyvpcobj

...

other arguments

data

data.frame or data.table of simulated data

ysim

numeric y-variable, typically named DV

Details

The simulated function is used for specifying simulated input data and variables for VPC. Note: Simulated data must not contain missing DV and may require subsetting MDV == 0 before generating VPC. The ordering of observed and simulated data must also be consistent, with replicates in simulated data stacked on top of each other.

Value

A tidyvpcobj containing simulated dataset sim formatted with columns x, y, and repl which indicates the replicate number. The column x is used from the observed() function. Resulting dataset is of class data.frame and data.table.

See Also

observed censoring stratify predcorrect binning binless vpcstats

Examples

1
2
3
vpc <- observed(obs_data, x=TIME, y=DV) %>%
    simulated(sim_data, y=DV) 
    

tidyvpc documentation built on Jan. 13, 2021, 6:31 a.m.