get.obs.env: Generates the observed environmental exposure data

View source: R/get.obs.env.R

get.obs.envR Documentation

Generates the observed environmental exposure data

Description

Adds a set level of error to binary or quantitative data (the true data) to obtain data with a larger variance (the observed data). The level of error is determined by the misclassification rates in binary exposure and by the set level of variance in the quantitative exposure.

Usage

get.obs.env(
  env.data = NULL,
  env.model = NULL,
  env.sd = NULL,
  env.prev = NULL,
  env.error = NULL,
  env.reliability = NULL
)

Arguments

env.data

a vector of environmental measures that represents the true data.

env.model

distribution of the exposure: binary=0 , normal=1 or uniform=2.

env.prev

prevalence of the environmental exposure.

env.error

misclassification rates: 1-sensitivity and 1-specificity.

env.reliability

reliability of the assessment of quantitative exposure.

Value

a dataframe with two coloumns/variables: true.environment the error free exposure data (true data). observed.environment the true esposure data with some added error (observed data).

Author(s)

Amadou Gaye


kwesterman/ESPRESSO.GxE.RV documentation built on Aug. 27, 2023, 4:44 a.m.