lincomr: Calculate a linear combination from regression results.

View source: R/lincomr.R

lincomrR Documentation

Calculate a linear combination from regression results.

Description

Pretty simple and strighforward right now. My friend Mike Lasarev had a big hand in helping me get this set up and figuring out how to do it.

It should handle results from linear regression, mixed models, logistic regression, and survival analysis. The big drawback currently is that p-values and test statistics are based on asymptotic theory; in the future it would be a better idea to incorporate t-statistics or Satterthwaite degrees of freedom.

Usage

lincomr(k, fit, alpha = 0.05)

Arguments

k

A vector of 1's and 0's to indicate the linear combination

fit

A model fit object

alpha

Significance level

Value

A data frame of results

Examples

data(iris)
mod_1 <- lm(Petal.Width ~ Sepal.Length + Sepal.Width + Petal.Length,
            data = iris)
summary(mod_1)
lincomr(k = c(1, 0, 1, 1), fit = mod_1)

emilelatour/lamisc documentation built on April 9, 2024, 10:33 a.m.