lm.pow: Compute the power of a linear model.

Description Usage Arguments Value Examples

Description

lm.pow computes (via simulation) the power of a linear model trained with pilot data.

Usage

1
lm.pow(lmodel, n, r = 10000, alpha = 0.05, conf.level = 0.95)

Arguments

lmodel

linear model trained through lm object.

n

sample size.

r

number of simulations to compute power.

alpha

significance threshhold.

conf.level

size of confidence intervals.

Value

The probability of finding p < α with the experiment description and a 95% Clopper-Pearson confidence interval for each item in the equation.

Examples

1
2
3
library(datasets)
Model <- lm(mpg ~ hp + vs, data = mtcars)
lm.pow(n=16, Model)

julianje/mcpa documentation built on May 13, 2019, 6:14 p.m.