This is an internal function that finds the proper boundary of the grid.
expandBound(data,bse,parameters,formula,m,k,family)
a data frame inputted from the main function.
numeric. The number of beta standard errors to utilize in constraining the beta grid limits. Passed down from argument bse
in the main evian
function.
a numeric vector of length 3 providing the starting values for the search. This is obtained from the getGridBound
function. The three numeric values in the vector should represent the beta estimates, s.e., and the correction factor respectively. Details can be found in getGridBound
.
a formula specifying the response and possible covariates to keep in the output dataframe. This is directly obtained from evian
function.
numeric vector. The strength of evidence criterion k. Passed down from argument kcutoff
in the main evian
function.
numeric. The density of the grid at which to compute the standardized likelihood function. Passed down from argument m
in the main evian
function.
a string representing the link function for ProfileLikelihood::ProfileLikelihood.glm
.
This function returns a numeric vector of length two representing the optimal lower and upper bounds for the grid on which the later functions will search for MLE.
Even though the initial grid bound calculated from getGridBound
works for most of the data, there can be cases where bse
needs to be increased in order to observe all the Likelihood Intervals (LIs) specified from the main function in the range kcutoff
calculated. In this case, our approach is to check whether the current grid range includes the largest LIs. The function will expand the grid range by increasing bse
by 1 if it is not included. This step will be running recursively until the largest LIs are included in the current grid range.