run_simulations: This function run all the simulations based on the structure...

Description Usage Arguments Details Value

View source: R/run_simulations.r

Description

This function run all the simulations based on the structure of the basic data frame.

Usage

1
2
3
4
run_simulations(dataset, exposures, confounders, libraries, outcomes,
  num.sim = 50, delta = c(0, 1), dr, newdata, show_times = FALSE,
  show_num_sim = TRUE, save_time = FALSE, verbose = FALSE,
  family = "gaussian", method = "method.NNLS")

Arguments

dataset

dataset with all variables

exposures

a vector with exposures

confounders

a vector with confounders

libraries

a vector of libraries to use

outcomes

outcome´s name

num.sim

number of simulations

delta

a vector with two values

dr

a vector with dose response values

newdata

the dataframe with new values

show_times

boolean parameter to see the time

show_num_sim

boolean parameter to see the iteration of simulations

save_time

boolean parameter to save the time in the result list

verbose

boolean parameter to see the verbose of superlearner

family

a character parameter to describe the family of the model

method

a character parameter to choose the method in the superlearner

Details

libraries could be SL if we don't select nothing or 'SL.glm', 'SL.glm.interaction','SL.glmnet', 'SL.gam','SL.xgboost','SL.polymars','SL.randomForest'

Value

a list with 4 objects: a data frame with all simulations, risk and coefficients of the crossvalidation and the time of the proces.


itamuria/expose documentation built on Aug. 10, 2020, 9:15 a.m.