knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

rmdl

Lifecycle: experimental CRAN status R-CMD-check pkgdown test-coverage Codecov test coverage Github commit frequency

Installation

This package can be downloaded from CRAN or from Github as below

# CRAN installation
install.packages("rmdl")
# Or remote/developmental version
remotes::install_github("shah-in-boots/rmdl")

Introduction

The package {rmdl} was intended as a way to handle causal- and epidemiology-based modeling by the following principles:

  1. Role determination of variables
  2. Generativity in formula creation
  3. Multiple model management

Usage

The package is simple to use. The mtcars dataset will serve as the example, and we will use linear regressions as the primary test. This toy example shows that we will be building six models in parallel, with the key exposure being the wt term, and the two outcomes being mpg and hp.

library(rmdl)

f <- fmls(mpg + hp ~ .x(wt) + disp + cyl + am, pattern = "parallel")
m <- fit(f, .fn = lm, data = mtcars, raw = FALSE)
mt <- model_table(mileage = m)
print(mt)

Classes

There are several important extended classes that this package introduces, however they are primarily used for internal validation and for shortcuts to allow more effective communication.

Advanced Usage

The {rmdl} package is intended to be flexible, extensible, and easy-to-use (albeit opinionated). Please see the vignettes for additional information.



asshah4/octomod documentation built on June 4, 2024, 12:48 p.m.