partialFtest: partial F test for Wasserstein regression

View source: R/partialFtest.R

partialFtestR Documentation

partial F test for Wasserstein regression

Description

partial F test for Wasserstein regression

Usage

partialFtest(reduced_res, full_res, alpha = 0.05)

Arguments

reduced_res

a reduced model list returned by the wass_regress function

full_res

a full model list returned by the wass_regress function

alpha

type one error rate

Details

two methods used to compute p value using asymptotic distribution of F statistic

  • 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 approximation method of mixtures of chi-square.

Value

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

Examples

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

full_res <- wass_regress(rightside_formula = ~., Xfit_df = predictor,
 Ymat = densityCurves, Ytype = 'density', Sup = dSup)
reduced_res <- wass_regress(~ log_b_vol + b_shapInd + midline_shift + B_TimeCT, Xfit_df = predictor,
 Ymat = densityCurves, Ytype = 'density', Sup = dSup)
partialFtable = partialFtest(reduced_res, full_res, alpha = 0.05)

WRI documentation built on July 9, 2022, 1:06 a.m.