test: Hypothesis testing of the partial association coefficients

Description Usage Arguments Examples

View source: R/test.R

Description

This function use bootstrapping to conduct hypothesis testing for the partial association coefficients. It directly applies onto the "PAsso" class of object generated by "PAsso".

Usage

1
test(object, bootstrap_rep = 300, H0 = 0, parallel = FALSE)

Arguments

object

An object of "PAsso" class, which is generated by "PAsso" function.

bootstrap_rep

The number of bootstrap replications. It may be slow.

H0

null hypothesis of partial correlation coefficient.

parallel

logical argument whether conduct parallel for bootstrapping partial association.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Import ANES2016 data in "PAsso"
data(ANES2016)
# Parial association:
PAsso_2v <- PAsso(responses = c("PreVote.num", "PID"),
                adjustments = c("income.num", "age", "edu.year"),
                data = ANES2016)

summary(PAsso_2v, digits=4)

PAsso_2v_test <- test(object = PAsso_2v, bootstrap_rep=20, H0=0, parallel=FALSE)
PAsso_2v_test

PAsso documentation built on June 18, 2021, 5:09 p.m.