Description Usage Arguments Value Examples
Calculate the mean and the variance of the exposure
1 | calculateExpoParams(df, pheno, expo)
|
df |
is the dataframe with the cohort information |
pheno |
is the studied outcome |
expo |
is the studied exposure |
A vector of length 2 which first element is the mean and second element is the variance
1 2 3 4 5 6 7 8 | #Case where E is quantitative
datafr = data.frame(floor(rnorm(5,5000,2000)), runif(5,2.5,3), runif(5, 1.2, 1.4))
colnames(datafr) = c("pheno_N", "pheno_expo_Mean", "pheno_expo_SD")
params = calculateExpoParams(df = datafr, pheno = "pheno", expo = "expo")
#Case where E is binary
datafr = data.frame(floor(rnorm(5,5000,2000)), floor(runif(5,1000,3000)))
colnames(datafr) = c("pheno_N", "pheno_expo_P")
params = calculateExpoParams(df = datafr, pheno = "pheno", expo = "expo")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.