Learn R Programming

WRI (version 0.2.1)

partialFtest: partial F test for Wasserstein regression

Description

partial F test for Wasserstein regression

Usage

partialFtest(reduced_res, full_res, alpha = 0.05)

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

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.

Examples

Run this code
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)

Run the code above in your browser using DataLab