compute_var: Compute variance

Description Usage Arguments Author(s) Examples

View source: R/compute_var.R

Description

Compute analitycal or Monte Carlo variance for unit Modal distributions

Usage

1
compute_var(family, mu, phi, MC = FALSE)

Arguments

family

character specifying the model. Currently are: betaMode, unitGompertz, unitGamma and Kumaraswamy

mu

mode parameter

phi

nuance parameter

MC

logical indicating if use Monte Carlo simulations to compute variance.

Author(s)

André Felipe B. Menezes andrefelipemaringa@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
mu <- 0.5
phi <- 3.0

V_beta   <- compute_var("betaMode", mu, phi)
V_ugtz   <- compute_var("unitGompertz", mu, phi)
V_ugamma <- compute_var("unitGamma", mu, phi)
V_kum    <- compute_var("Kumaraswamy", mu, phi)

cbind(mu=mu, phi=phi, V_beta, V_ugtz, V_ugamma, V_kum)

V_beta   <- compute_var("betaMode", mu, phi, MC=TRUE)
V_ugtz   <- compute_var("unitGompertz", mu, phi, MC=TRUE)
V_ugamma <- compute_var("unitGamma", mu, phi, MC=TRUE)
V_kum    <- compute_var("Kumaraswamy", mu, phi, MC=TRUE)

cbind(mu=mu, phi=phi, V_beta, V_ugtz, V_ugamma, V_kum)

AndrMenezes/unitModalReg documentation built on March 12, 2021, 5:24 a.m.