Main Page | Directories | File List | File Members | Related Pages

# IndependenceTest.c File Reference

`#include "party.h"`

Include dependency graph for IndependenceTest.c:

Go to the source code of this file.

## Functions
void | C_TeststatPvalue (const SEXP linexpcov, const SEXP varctrl, double *ans_teststat, double *ans_pvalue)
void | C_TeststatCriterion (const SEXP linexpcov, const SEXP varctrl, double *ans_teststat, double *ans_criterion)
void | C_IndependenceTest (const SEXP x, const SEXP y, const SEXP weights, const SEXP ScoreMatrix, SEXP Mlinexpcov, const int ORDERED, SEXP linexpcov, SEXP varctrl, SEXP ans)
SEXP | R_IndependenceTest (SEXP x, SEXP y, SEXP weights, SEXP ScoreMatrix, SEXP Mlinexpcov, SEXP linexpcov, SEXP varctrl)
void | C_GlobalTest (const SEXP learnsample, const SEXP weights, SEXP fitmem, const SEXP varctrl, const SEXP gtctrl, const double minsplit, double *ans_teststat, double *ans_criterion)
SEXP | R_GlobalTest (SEXP learnsample, SEXP weights, SEXP fitmem, SEXP varctrl, SEXP gtctrl)

## Detailed Description

Functions for variable selection in each node of a tree

Author:
  Author
    hothorn

Date:
  Date
    2006-04-05 16:24:23 +0200 (Wed, 05 Apr 2006)

Definition in file IndependenceTest.c.

## Function Documentation

void C_GlobalTest | ( | const SEXP | learnsample,
|  | const SEXP | weights,
|  | SEXP | fitmem,
|  | const SEXP | varctrl,
|  | const SEXP | gtctrl,
|  | const double | minsplit,
|  | double * | ans_teststat,
|  | double * | ans_criterion
| ) |

  | Perform a global test on independence of a response and multiple inputs Parameters:
  | learnsample | an object of class `LearningSample'
  | weights | case weights
  | fitmem | an object of class `TreeFitMemory'
  | varctrl | an object of class `VariableControl'
  | gtctrl | an object of class `GlobalTestControl'
  | minsplit | minimum sum of weights to proceed
  | ans_teststat | return value; vector of test statistics
  | ans_criterion | return value; vector of node criteria (adjusted) pvalues or raw test statistics
Definition at line 157 of file IndependenceTest.c. References AGGREGATED, BONFERRONI, C_ExpectCovarInfluence(), C_LinStatExpCov(), C_LinStatExpCovMPinv(), C_MLinearStatistic(), C_MonteCarlo(), C_SampleNoReplace(), C_TeststatCriterion(), get_dontuse(), get_dontusetmp(), get_missings(), get_Mscorematrix(), get_mtry(), get_ninputs(), get_nobs(), get_randomsplits(), get_teststat(), get_testtype(), get_tol(), get_transformation(), get_varmemory(), get_varMmemory(), get_weights(), has_missings(), is_ordinal(), MONTECARLO, ncol(), nrow(), PL2_expcovinfSym, PL2_inputsSym, PL2_responsesSym, PL2_sumweightsSym, TESTSTATISTIC, and UNIVARIATE. Referenced by C_Node(), and R_GlobalTest(). Here is the call graph for this function:

void C_IndependenceTest | ( | const SEXP | x,
|  | const SEXP | y,
|  | const SEXP | weights,
|  | const SEXP | ScoreMatrix,
|  | SEXP | Mlinexpcov,
|  | const int | ORDERED,
|  | SEXP | linexpcov,
|  | SEXP | varctrl,
|  | SEXP | ans
| ) |

  | Test of independence between x and y Parameters:
  | x | values of the transformation
  | y | values of the influence function
  | weights | case weights
  | ScoreMatrix | for ordinal variables, the score matrix M
  | Mlinexpcov | an object of class `VariableControl' for MT
  | ORDERED | logical
  | linexpcov | an object of class `VariableControl' for T
  | varctrl | an object of class `VariableControl'
  | ans; | return value, a double vector (teststat, pvalue)
Definition at line 81 of file IndependenceTest.c. References C_LinStatExpCov(), C_LinStatExpCovMPinv(), C_MLinearStatistic(), C_TeststatPvalue(), get_teststat(), get_tol(), ncol(), nrow(), and PL2_expcovinfSym. Referenced by R_IndependenceTest(). Here is the call graph for this function:

void C_TeststatCriterion | ( | const SEXP | linexpcov,
|  | const SEXP | varctrl,
|  | double * | ans_teststat,
|  | double * | ans_criterion
| ) |

  | Computes the test statistic and the node criterion Parameters:
  | linexpcov | an object of class `LinStatExpectCovar'
  | varctrl | an object of class `VariableControl'
  | ans_teststat; | return value, the test statistic
  | ans_criterion; | return value, thep-value
Definition at line 53 of file IndependenceTest.c. References C_TeststatPvalue(), and get_pvalue(). Referenced by C_GlobalTest(), and C_MonteCarlo(). Here is the call graph for this function:

void C_TeststatPvalue | ( | const SEXP | linexpcov,
|  | const SEXP | varctrl,
|  | double * | ans_teststat,
|  | double * | ans_pvalue
| ) |

  | Computes the test statistic and, if requested, the corresponding P-value for a linear statistic Parameters:
  | linexpcov | an object of class `LinStatExpectCovar'
  | varctrl | an object of class `VariableControl'
  | ans_teststat; | return value, the test statistic
  | ans_pvalue; | return value, the p-value
Definition at line 21 of file IndependenceTest.c. References C_ConditionalPvalue(), C_TestStatistic(), get_abseps(), get_maxpts(), get_pvalue(), get_releps(), get_teststat(), and get_tol(). Referenced by C_IndependenceTest(), and C_TeststatCriterion(). Here is the call graph for this function:

SEXP R_GlobalTest | ( | SEXP | learnsample,
|  | SEXP | weights,
|  | SEXP | fitmem,
|  | SEXP | varctrl,
|  | SEXP | gtctrl
| ) |

  | R-interface to C_GlobalTest Parameters:
  | learnsample | an object of class `LearningSample'
  | weights | case weights
  | fitmem | an object of class `TreeFitMemory'
  | varctrl | an object of class `VariableControl'
  | gtctrl | an object of class `GlobalTestControl'
Definition at line 302 of file IndependenceTest.c. References C_GlobalTest(), and get_ninputs(). Here is the call graph for this function:

SEXP R_IndependenceTest | ( | SEXP | x,
|  | SEXP | y,
|  | SEXP | weights,
|  | SEXP | ScoreMatrix,
|  | SEXP | Mlinexpcov,
|  | SEXP | linexpcov,
|  | SEXP | varctrl
| ) |

  | R-interface to C_IndependenceTest Parameters:
  | x | values of the transformation
  | y | values of the influence function
  | weights | case weights
  | ScoreMatrix | for ordinal variables, the score matrix M
  | Mlinexpcov | an object of class `VariableControl' for MT
  | linexpcov | an object of class `VariableControl' for T
  | varctrl | an object of class `VariableControl'
Definition at line 127 of file IndependenceTest.c. References C_IndependenceTest(). Here is the call graph for this function: