R/short_wass_regress.R

Defines functions short_wass_regress

Documented in short_wass_regress

#' quick wasserstein regression fitting function with smoothed input
#' @name globalFstat
#' @keywords internal
short_wass_regress <- function(Xfit_df, smoothY){

        Qobs = smoothY$Qobs
        Qmat_lm <- stats::lm(Qobs ~ Xfit_df)
        Qfitted = fitted(Qmat_lm)

        res = structure(list(
                call = NULL,
                lm_res = NULL,
                predictor_names = NULL,

                qfit = NULL,
                ffit = NULL,
                Qfit = Qfitted,

                xfit = Xfit_df,
                Ysmooth = smoothY,
                t_equal = NULL),
                class = 'WRI')
}

Try the WRI package in your browser

Any scripts or data that you put into this service are public.

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