exponentialc_ function(n) { # Obtain estimated critical values for the D-Test statistic, # assuming that the mixture parameters were estimated via # unpenalized maximum likelihood. These critical values # are based on a null distribution in which beta_0 = 1. # To obtain critical values for other null distributions, # multiply these critical values by beta_0 (or hat beta_0) # if there is no weighting function; divide by beta_0 (or # hat beta_0) for weighting function w_2(x) = x^2. # # Scenario: # H_0: There exists beta_0 such that # p_1 f(x | beta_1) + p_2 f(x | beta_2) # may be written as f(x | beta_0). # H_1: There is no such beta_0. # # Required Input: # n is the size of the underlying data set ("sample size"). # It is assumed that n is at least 10. # # Outputs: # a01 is an estimated level 0.01 critical value for the # D-Test statistic, assuming that the mixture parameters # were estimated via unpenalized maximum likelihood, # obtained by a suitable interpolation between estimated # critical values that have been tabulated for particular # choices of n. The tabulated values are based on # simulations of size 10000. # a05 is an estimated level 0.05 critical value. # a10 is an estimated level 0.10 critical value. # a01.w1, a05.w1, a10.w1 are estimated critical values # based on the weighting function w_1(x) = x # a01.w2, a05.w2, a10.w2 are estimated critical values # based on the weighting function w_2(x) = x^2 # # Caveat: # The exponential scale family does not satisfy one of the # regularity conditions (uniform boundedness) used to obtain # the convergence rate of the D-Test statistic, unless the # parameter space is severely restricted. Thus, the estimated # critical values provided by this function may or may not be # reliable for n > 4000. n_ as.integer(n) if (n > 4000) { ninf_ 4000 a10.inf_ 0.000068 a05.inf_ 0.000119 a01.inf_ 0.000239 nsup_ Inf a10.sup_ 0 a05.sup_ 0 a01.sup_ 0 } if (n == 4000) { ninf_ 4000 a10.inf_ 0.000068 a05.inf_ 0.000119 a01.inf_ 0.000239 nsup_ 4000 } if ((3000 ninf) { a10_ a10.inf*(n^(-1) - nsup^(-1))/(ninf^(-1)-nsup^(-1)) + a10.sup*(- n^(-1) + ninf^(-1))/(ninf^(-1)-nsup^(-1)) a05_ a05.inf*(n^(-1) - nsup^(-1))/(ninf^(-1)-nsup^(-1)) + a05.sup*(- n^(-1) + ninf^(-1))/(ninf^(-1)-nsup^(-1)) a01_ a01.inf*(n^(-1) - nsup^(-1))/(ninf^(-1)-nsup^(-1)) + a01.sup*(- n^(-1) + ninf^(-1))/(ninf^(-1)-nsup^(-1)) } # weighting function w_1(x) = x if (n > 4000) { ninf_ 4000 a10.inf_ 0.000037 a05.inf_ 0.000062 a01.inf_ 0.000127 nsup_ Inf a10.sup_ 0 a05.sup_ 0 a01.sup_ 0 } if (n == 4000) { ninf_ 4000 a10.inf_ 0.000037 a05.inf_ 0.000062 a01.inf_ 0.000127 nsup_ 4000 } if ((3000 ninf) { a10.w1_ a10.inf*(n^(-1) - nsup^(-1))/(ninf^(-1)-nsup^(-1)) + a10.sup*(- n^(-1) + ninf^(-1))/(ninf^(-1)-nsup^(-1)) a05.w1_ a05.inf*(n^(-1) - nsup^(-1))/(ninf^(-1)-nsup^(-1)) + a05.sup*(- n^(-1) + ninf^(-1))/(ninf^(-1)-nsup^(-1)) a01.w1_ a01.inf*(n^(-1) - nsup^(-1))/(ninf^(-1)-nsup^(-1)) + a01.sup*(- n^(-1) + ninf^(-1))/(ninf^(-1)-nsup^(-1)) } # weighting function w_2(x) = x^2 if (n > 4000) { ninf_ 4000 a10.inf_ 0.000063 a05.inf_ 0.000105 a01.inf_ 0.000216 nsup_ Inf a10.sup_ 0 a05.sup_ 0 a01.sup_ 0 } if (n == 4000) { ninf_ 4000 a10.inf_ 0.000063 a05.inf_ 0.000105 a01.inf_ 0.000216 nsup_ 4000 } if ((3000 ninf) { a10.w2_ a10.inf*(n^(-1) - nsup^(-1))/(ninf^(-1)-nsup^(-1)) + a10.sup*(- n^(-1) + ninf^(-1))/(ninf^(-1)-nsup^(-1)) a05.w2_ a05.inf*(n^(-1) - nsup^(-1))/(ninf^(-1)-nsup^(-1)) + a05.sup*(- n^(-1) + ninf^(-1))/(ninf^(-1)-nsup^(-1)) a01.w2_ a01.inf*(n^(-1) - nsup^(-1))/(ninf^(-1)-nsup^(-1)) + a01.sup*(- n^(-1) + ninf^(-1))/(ninf^(-1)-nsup^(-1)) } return(a01,a05,a10,a01.w1,a05.w1,a10.w1,a01.w2,a05.w2,a10.w2) result }