wass_regress | R Documentation |
Perform Frechet Regression with the Wasserstein Distance
wass_regress(rightside_formula, Xfit_df, Ytype, Ymat, Sup = NULL)
rightside_formula |
a right-side formula |
Xfit_df |
n-by-p matrix (or dataframe) of predictor values for fitting (do not include a column for the intercept) |
Ytype |
'quantile' or 'density' |
Ymat |
one of the following matrices:
|
Sup |
one of the following vectors:
|
a list containing the following objects:
call |
function call |
rformula |
|
predictor_names |
names of predictors as the colnames given in the xfit matrix or dataframe. |
Qfit |
n-by-m matrix of fitted quantile functions. |
xfit |
design matrix in quantile fitting. |
Xfit_df |
n-by-p matrix (or dataframe) of predictor values for fitting |
Yobs |
a list containing the following matrices:
|
t_vec |
a length m vector - common grid for all quantile functions in Qobs. |
Wasserstein F-tests and confidence bands for the Frechet regression of density response curves, Alexander Petersen, Xi Liu and Afshin A. Divani, 2019
data(strokeCTdensity) predictor = strokeCTdensity$predictors dSup = strokeCTdensity$densitySupport densityCurves = strokeCTdensity$densityCurve res1 = wass_regress(rightside_formula = ~., Xfit_df = predictor, Ytype = 'density', Ymat = densityCurves, Sup = dSup) res2 = wass_regress(rightside_formula = ~ log_b_vol * weight, Xfit_df = predictor, Ytype = 'density', Ymat = densityCurves, Sup = dSup)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.