Learn R Programming

WRI (version 0.2.1)

globalFtest: global F test for Wasserstein regression

Description

global F test for Wasserstein regression

Usage

globalFtest(
  wass_regress_res,
  alpha = 0.05,
  permutation = FALSE,
  numPermu = 200,
  bootstrap = FALSE,
  numBoot = 200
)

Value

a list containing the following fields:

  • wasserstein.F_stat:the Wasserstein F statistic value in Satterthwaite method.

  • chisq_df:the degree of freedom of the null chi-square distribution.

  • summary_df:a dataframe containing the following columns:

    • method:methods used to compute p value, see details

    • statistic:the test statistics

    • critical_value:critical value

    • p_value:p value of global F test

Arguments

wass_regress_res

an object returned by the wass_regress function

alpha

type one error rate

permutation

logical; perform permutation global F test (default: FALSE)

numPermu

number of permutation samples if permutation = TRUE

bootstrap

logical; bootstrap global F test (default: FALSE)

numBoot

number of bootstrap samples if bootstrap = TRUE

Details

four methods used to compute p value of global F test

  • truncated: asymptotic inference, p-value is obtained by truncating the infinite summation of eigenvalues into the first K terms, where the first K terms explain more than 99.99% of the variance.

  • satterthwaite: asymptotic inference, p-value is computed using Satterthwaite's approximation method of mixtures of chi-square.

  • permutation: resampling technique; Wasserstein SSR is used as the F statistic.

  • bootstrap: resampling technique; Wasserstein SSR is used as the F statistic.

Examples

Run this code
data(strokeCTdensity)
predictor = strokeCTdensity$predictors
dSup = strokeCTdensity$densitySupport
densityCurves = strokeCTdensity$densityCurve

res = wass_regress(rightside_formula = ~., Xfit_df = predictor,
Ytype = 'density', Ymat = densityCurves, Sup = dSup)
globalF_res = globalFtest(res, alpha = 0.05, permutation = TRUE, numPermu = 200)

Run the code above in your browser using DataLab