setup_model: Setup Model and Formula

Description Usage Arguments Value Examples

View source: R/package_contents.R

Description

Setup Model and Formula

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
setup_model(
  model_name,
  synced_folder,
  clear_model = TRUE,
  formula = y ~ x1 + x2,
  family = binomial(),
  all_site_names = NULL,
  link = NULL,
  max_iterations = 100,
  tolerance = 1e-09
)

make_family(family, link = NULL)

Arguments

model_name

name of your model

synced_folder

synced folder to do computation

clear_model

Should the model be cleared (all files deleted model with same name) before creating new model

formula

model formula to fit, with tilde syntax

family

generalized linear model family, see family

all_site_names

all the site names to fit this model

link

link function to use with family

max_iterations

maximum number of iterations to run

tolerance

tolerance for convergence

Value

A character path to a formula/model file

Examples

1
2
3
4
5
6
tdir = tempfile()
dir.create(tdir)
model_name = "logistic_example"
form_file = setup_model(model_name = model_name,
synced_folder = tdir,
formula =  y ~ x1 + x2, family =  binomial())

distribglm documentation built on April 15, 2021, 5:06 p.m.