getGridBound {evian}R Documentation

Obtain the range of the grid where MLE will be searched at

Description

This is an internal function that provides the range where the profileLikelihood function would search for MLE.

Usage

  getGridBound(formula,data,bse,k,m,family,robust)

Arguments

formula

a formula specifying the response and possible covariates to keep in the output dataframe. This is directly obtained from evian function.

data

a data frame inputted from the output of subsetData.

bse

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.

k

numeric vector. The strength of evidence criterion k. Passed down from argument kcutoff in the main evian function.

m

numeric. The density of the grid at which to compute the standardized likelihood function. Passed down from argument m in the main evian function.

family

a string representing the link function for ProfileLikelihood::ProfileLikelihood.glm.

robust

A numeric value, robust correction factor.

Details

getGridBound is an interior function that searches for the proper grid range that would be used to search for MLE. This is done through two steps: First, it finds a starting grid range by fitting a (generalized) linear model to obtain the estimate and s.e. of the beta. Then the starting grid range can be defined as mean +- bse*s.e. . In the case where robust correction is needed, the grid will be defined as mean +- bse*s.e./correction factor. Then the function determines an optimal grid range by using expandBound function.

Value

This function returns a numeric vector of length 2 that represents the lower and upper bounds of the grid for the MLE search.


[Package evian version 2.1.0 Index]