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

regtools

The goal of regtools is to provide simple tools for the analysis of regression models.

Installation

You can install the released version of regtools from GitHub with:

# install.packages("devtools")
devtools::install_github("uo-cmor/regtools")

Example

This is a basic example which shows you how to solve a common problem:

library(regtools)

df <- data.frame(a = 1:12, b = rep(c("b1", "b2", "b3"), c(4, 5, 3)), c = rep(0:1, c(5, 7)))
model <- lm(a ~ b + c, df)

lincom(model, c(1, 0.5, 0.3, 0.2))

lincom(model, rbind(c(1, 0.5, 0.3, 0.2),
                        c(0.2, 0.3, 0.5, 0.2)))


uo-cmor/regtools documentation built on Oct. 13, 2024, 10:35 p.m.