psi_criterion_RGHD_ratio: Psi Criterion for RGHD parameter ratios

Description Usage Arguments Examples

View source: R/SkeweDF_functions.R

Description

This function generates the Psi Criterion goodness of fit value given an empirical distribution for the 2m-RGHD function. Parameters r and q/r ratios are given, as well as desired weight of pmf and use of the weighted right-tail cumulative distribution function.

Usage

1
2
3
4
5
6
7
8
9
psi_criterion_RGHD_ratio(
  params,
  data,
  m,
  pmf_weight = 0,
  weighted_rt = FALSE,
  left_trunc = 1,
  right_trunc = left_trunc + length(data) - 1
)

Arguments

params

Vector of parameters for model_fn, not including n. For example, for 2m-RGHD (m=2), params <- c(3, 5, 0.3, 1.5). In this case r1 = 3, r2 = 5, q1/r1 = 0.3, and q2/r2 = 1.5

data

Vector of observed values

m

m parameter for 2m-RGHD function

pmf_weight

Numeric of weight given to probability mass function for generation of Psi Criterion. For example, if pmf_weight <- 0.5, 50 percent of the Psi Criterion value will be attributed to the probability mass function while the other 50 percent will be attributed to the right-tail cumulative distribution function.

weighted_rt

Boolean used to determine if the weighted right-tail cumulative distribution function should be used or not.

left_trunc

Int used to determine starting index of model to use for optimization

right_trunc

Int used to determine ending index of model to use for optimization

Examples

1
2
3
obs_data <- c(100,75,20,1)
parameters <- c(3, 5, 0.3, 1.5)
psi <- psi_criterion_RGHD_ratio(parameters, obs_data, 2)

SkeweDF documentation built on Jan. 16, 2021, 5:38 p.m.