R/kopula.R

Defines functions kopula

Documented in kopula

#' @export kopula
#' @importFrom copula archmCopula fgmCopula
#'
kopula <- function(fam, tht, dm){
	# print(paste("fam =", fam))
	if (fam == "amh"){
		if (dm == 2){
			kop3 = archmCopula(family = fam, param = tht, dim = dm)
		} else {
			stop("'dm' must be 2 for 'amh'")
		}
  } else {
  	if (fam == "fgm"){
  	if (dm == 2){
  		kop3 = fgmCopula(tht)
  	} else {
  		stop("bad 'dm'")
  	}
  } else {
		kop3 = archmCopula(family = fam, param = tht, dim = dm)
  }}
  return(kop3)
}

Try the vfcp package in your browser

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

vfcp documentation built on May 2, 2019, 2:52 p.m.