Description Usage Arguments Value References Examples
Focused information criteria for general models. These methods estimate the bias and variance of estimates of a quantity of interest (the "focus") when smaller submodels are used in place of a "wide" model that is assumed to generate the data but may not give precise enough estimates.
1 2 3 4 5 6 |
wide |
Fitted model object containing the wide model. |
inds |
Matrix or vector of indicators for which parameters are included in the submodel or submodels to be assessed. A matrix should be supplied if there are multiple submodels. This should have number of rows equal to the number of submodels, and number of columns equal to the total number of parameters in the wide model. It contains 1s in the positions where the parameter is included in the submodel, and 0s in positions where the parameter is excluded. This should always be 1 in the positions defining the narrow model, as specified in |
inds0 |
Vector of indicators specifying the narrow model, in the same format as |
gamma0 |
Vector of special values taken by the parameters gamma which define the narrow model. This defaults to 0, as in covariate selection, where "excluded" coefficients are fixed to 0. This should either be a scalar, assumed to be the same for all parameters fixed in the narrow model, or a vector of length equal to the number of parameters from the wide model which are fixed in the narrow model, that is, the number of entries of |
focus |
An R function with:
The function should return the focus quantity of interest. If additional arguments are supplied which are vectors or matrices, e.g. Not required if Alternatively,
See |
focus_deriv |
Vector of partial derivatives of the focus function with respect to the parameters in the wide model. This is not usually needed, as it can generally be computed automatically and accurately from the function supplied in |
wt |
Vector of weights to apply to different covariate values in |
sub |
List of fitted model objects corresponding to each submodel to be assessed. For some classes of models with built in methods for Otherwise, this argument can be omitted, but it is required if you want the estimate of the focus function under each submodel to be included in the results, which is usually the case. |
fns |
Named list of functions to extract the quantities from the fitted model object that are required to calculate the focused model comparison statistics. By default this is
Suppose the fitted model object is called
If one or more of these functions does not work for
If less than three components are specified in |
FIC |
If |
B |
If |
loss |
A function returning an estimated loss for a submodel estimate under the sampling distribution of the wide model. Only applicable when using bootstrapping. This should have two arguments |
tidy |
If |
... |
Other arguments to the focus function can be supplied here. The built-in focus functions If just one focus is needed, then To compute focused model comparison statistics for multiple focuses defined by the same focus function evaluated at multiple covariate values, For a typical regression model, the first parameter will denote an intercept, so the first value of Arguments to the focus function other than |
The returned data frame or array contains the following components, describing characteristics of the defined submodel. See the package vignette for full, formal definitions, and Chapter 6 of Claeskens and Hjort, 2008.
rmse |
The root mean square error of the estimate of the focus quantity. Defined as the square root of (squared unadjusted bias plus variance). This is an asymptotically unbiased estimator, but may occasionally be indeterminate if the estimate of the squared bias plus variance is negative. |
rmse.adj |
The root mean square error, based on a bias estimator which is adjusted to avoid negative squared bias. Defined on page 157 of Claeskens and Hjort as the sum of the variance and the squared adjusted bias. |
bias |
The estimated bias of the focus quantity, adjusted to avoid negative squared bias. This is defined as the square root of the quantity sqb3(S) from page 152 of Claeskens and Hjort, multiplied by the sign of the unadjusted bias. |
se |
The estimated standard error (root variance) of the focus quantity. Defined on page 157. |
FIC |
The focused information criterion (equation 6.1 from Claeskens and Hjort), if |
The object returned by fic
also has the following attributes, which can be extracted with the attr
function.
iwide |
Index of the wide model in the vector of submodels, or |
inarr |
Index of the narrow model in the vector of submodels, or |
sub |
List of fitted submodel objects. |
parnames |
Vector of names of parameters in the wide model. |
inds |
Submodel indicators, as supplied in the |
Claeskens, G., & Hjort, N. L. (2008). Model selection and model averaging (Vol. 330). Cambridge: Cambridge University Press.
Claeskens, G., & Hjort, N. L. (2003). The focused information criterion. Journal of the American Statistical Association, 98(464), 900-916.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | wide.glm <- glm(low ~ lwtkg + age + smoke + ht + ui + smokeage + smokeui,
data=birthwt, family=binomial)
inds <- rbind(
narrow = c(1,1,0,0,0,0,0,0),
mod1 = c(1,1,1,1,0,0,0,0),
wide = c(1,1,1,1,1,1,1,1)
)
vals.smoke <- c(1, 58.24, 22.95, 1, 0, 0, 22.95, 0)
vals.nonsmoke <- c(1, 59.50, 23.43, 0, 0, 0, 0, 0)
X <- rbind("Smokers"=vals.smoke, "Non-smokers"=vals.nonsmoke)
fic(wide=wide.glm, inds=inds, focus="prob_logistic", X=X)
focus <- function(par, X)plogis(X %*% par)
fic(wide=wide.glm, inds=inds, focus=focus, X=X) # equivalent
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.