citestgeneric  R Documentation 
Generic function for conditional independence test. Specializes to specific types of data.
ciTest(x, set = NULL, ...)
x 
An object for which a test for conditional independence is to be
made. See 'details' for valid types of 
set 
A specification of the test to be made. The tests are of the form
u and v are independent condionally on S where u and v are variables and
S is a set of variables. See 'details' for details about specification of

... 
Additional arguments to be passed on to other methods. 
x
can be
a table (an array). In this case ciTest_table
is called.
a dataframe whose columns are numerics and factors. In this
case ciTest_df
is called.
a list with components cov
and n.obs
. In this
case ciTest_mvn
is called.
set
can be
a vector,
a righthand sided formula in which variables are separated by '+'.
In either case, it is tested if the first two variables in the
set
are conditionally independent given the remaining
variables in set
. (Notice an abuse of the '+' operator in
the righthand sided formula: The order of the variables does
matter.)
An object of class citest
(which is a list).
Søren Højsgaard, sorenh@math.aau.dk
ciTest_table
,
ciTest_df
,
ciTest_mvn
,
chisq.test
## contingency table:
data(reinis)
## dataframe with only numeric variables:
data(carcass)
## dataframe with numeric variables and factors:
data(milkcomp1)
ciTest(cov.wt(carcass, method='ML'), set=~Fat11 + Meat11 + Fat12)
ciTest(reinis, set=~smo + phy + sys)
ciTest(milkcomp1, set=~tre + fat + pro)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.