R/reg_coef.R

Defines functions reg_coef

Documented in reg_coef

#Internal helper function
#' @title Regression Coefficient Estimation
#' 
#' @description internal helper function
#' @export
#' @keywords internal
#' @return
#' @examples
#' \dontrun{
#' 
#' }
reg_coef <- function(basis, x, y, j) {
  stopifnot(length(x) == length(y))
  phi_j <- y * basis$get_function(j)(x)
  return(mean(phi_j))
}
nschaefer1211/OSE documentation built on Dec. 31, 2020, 12:59 a.m.