R: Tests the five Berry, Golder and Milton (2012) Interactive...
BGMtest
R Documentation
Tests the five Berry, Golder and Milton (2012) Interactive Hypothesis
Description
This function tests the five hypotheses that Berry, Golder and Milton identify as important when two quantitative variables are interacted in a linear model.
A vector of two variable names giving the two quantitative variables involved in the interaction. These variables must be involved in one, and only one, interaction.
digits
Number of digits to be printed in the summary.
level
Type I error rate for the tests.
two.sided
Logical indicating whether the tests should be two-sided (if TRUE, the default) or one-sided (if FALSE).
Value
A matrix giving five t-tests.
Author(s)
Dave Armstrong (UW-Milwaukee, Department of Political Science)
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(DAMisc)
Loading required package: car
Loading required package: effects
Attaching package: 'effects'
The following object is masked from 'package:car':
Prestige
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DAMisc/BGMtest.Rd_%03d_medium.png", width=480, height=480)
> ### Name: BGMtest
> ### Title: Tests the five Berry, Golder and Milton (2012) Interactive
> ### Hypothesis
> ### Aliases: BGMtest
>
> ### ** Examples
>
> library(car)
> data(Duncan)
> mod <- lm(prestige ~ income*education + type, data=Duncan)
> BGMtest(mod, c("income", "education"))
est se t p-value
P(X|Zmin) 0.815 0.135 6.024 0.000
P(X|Zmax) 0.326 0.156 2.087 0.043
P(Z|Xmin) 0.603 0.165 3.652 0.001
P(Z|Xmax) 0.214 0.126 1.696 0.098
P(XZ) -0.005 0.003 -2.081 0.044
>
>
>
>
>
> dev.off()
null device
1
>