Learn R Programming

LNPar (version 1.1.3)

ParallelTest: Profile-based testing for a Pareto tail

Description

This function computes the bootstrap test for the null hypothesis of a pure lognormal distribution versus the alternative of a lognormal-Pareto mixture, where the parameters of the latter are estimated via maximum profile likelihood. Implemented via parallel computing.

Usage

ParallelTest(nboot, y, obsTest, minRank)

Value

A list with the following elements:

LR: nboot simulated values of the llr test under the null hypothesis.

pval: p-value of the test.

Arguments

nboot

number of bootstrap replications.

y

observed data.

obsTest

value of the test statistics computed with the data under analysis.

minRank

minimum possible rank of the threshold.

Examples

Run this code
minRank = 90
mixFit <- LPfitProf(TN2016,minRank,0)
ell1 <- mixFit$loglik
estNull <- c(mean(log(TN2016)),sd(log(TN2016)))
ellNull <- sum(log(dlnorm(TN2016,estNull[1],estNull[2])))
obsTest <- 2*(ell1-ellNull)
nboot = 2
TestRes = ParallelTest(nboot,TN2016,obsTest,minRank)

Run the code above in your browser using DataLab