Learn R Programming

expose (version 0.0.3)

general_function: General function create the basic structure for the analysis

Description

General function create the basic structure for the analysis

Usage

general_function(dataset, exposures, confounders, outcomes, delta, dr)

Arguments

dataset

dataset with all variables

exposures

a vector with exposures

confounders

a vector with confounders

outcomes

outcome<U+00B4>s name

delta

a vector with two values

dr

a vector with dose response values

Value

a list with 2 objects. One is the dataframe with all the values and the other is a summary of the groups and the corresponding rows in the first dataframe.

Details

.

Examples

Run this code
# NOT RUN {
data(expose_data)
N <- dim(expose_data)[1]
Outcome='Y4'
seku <- seq(0,1,0.05)   #c(0,0.1,0.2,0.25,0.3,0.4,0.5,0.6,0.7,0.75,0.8,0.9,1)
our.num.sim <- 5
delta=c(1,0)
Exposures<- c('Var1','Var2','Var3','Var4','Var5')
Confounders<- c('sex')
Outcome <- c('Y4')
gen <- general_function (dataset = expose_data, exposures = Exposures, 
                         confounders = Confounders,
                         outcomes = Outcome[1], delta=delta, dr = seku)
# }

Run the code above in your browser using DataLab