testparm: Test the hypothesis that a set of coefficients are equal to...

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Inputs a linear model from the lm function and set of indices for coefficients. Tests the hypothesis the specified set of coefficients are equal to zero. NOTE: beta0 = 1, beta1 = 2, and so on.

Usage

1
testparm(par, model, type = "F")

Arguments

par

A vector specifying the indices of the coefficients to be tested

model

An lm object

type

Indicates whether an F-test or Wald test should be used

Value

A vector containing the test statistic and p-value

Examples

1
2
3
4
# Tests if beta1, beta4, beta5, and beta7 == 0 using an F-test
# testparm(par = c(2,5,6,8),
#          model=my_linear_model,
#          type="F)

maxdrohde/bios6312 documentation built on March 13, 2021, 1:50 p.m.