R/fct_sigma.R

Defines functions fct_sigma

Documented in fct_sigma

#' Internal Sigma Estimation Function
#'
#' @inheritParams fct_gamma
#' @param m The number of outcome variables.
#'
#' @keywords internal
#'
#' @importFrom stats median
#'
#' @return The estimated sigma.
#'
fct_sigma <- function(y, N, m){
  sv <- svd(y)$d
  stats::median(sv[sv!=0])/sqrt(max(N,m))
}

Try the mixedLSR package in your browser

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

mixedLSR documentation built on Nov. 10, 2022, 6:17 p.m.