Learn R Programming

ggm (version 2.2)

pcor.test: Test for zero partial association

Description

Test for conditional independence between two variables, given the other ones, assuming a multivariate normal distribution.

Usage

pcor.test(r, q, n)

Arguments

r
a partial correlation coefficient, computed by pcor.
q
the number of variables in the conditioning set.
n
integer > 0, the sample size.

Value

  • tvalThe Student's t-test statistic.
  • dfThe degrees of freedom
  • pvalueThe P-value, assuming a two-sided alternative.

See Also

pcor, shipley.test

Examples

Run this code
## Are 2,3 independent given 1?
data(marks)
pcor.test(pcor(c(2,3,1), var(marks)), 1, n=88)

Run the code above in your browser using DataLab