fence.sae: Fence model selection (Small Area Estmation)

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/fence.sae.R

Description

Fence model selection (Small Area Estmation)

Usage

1
2
3
fence.sae(full, data, B = 100, grid = 101, fence = c("adaptive",
  "nonadaptive"), cn = NA, method = c("F-H", "NER"), D = NA,
  REML = FALSE, bandwidth = NA, cpus = parallel::detectCores())

Arguments

full

formular of full model

data

data

B

number of bootstrap sample, parametric for lmer

grid

grid for c

fence

fence method to be used, e.g., adaptive, or nonadaptive. It's suggested to choose nonadaptive procedure if c is known; otherwise nonadaptive must be chosen

cn

cn for nonadaptive

method

Select method to use

D

vector containing the D sampling variances of direct estimators for each domain. The values must be sorted as the variables in formula. Only used in FH model

REML

Restricted Maximum Likelihood approach

bandwidth

bandwidth for kernel smooth function

cpus

Number of parallel computers

Details

In Jiang et. al (2008), the adaptive c value is chosen from the highest peak in the p* vs. c plot. In Jiang et. al (2009), 95% CI is taken into account while choosing such an adaptive choice of c. In Thuan Nguyen et. al (2014), the adaptive c value is chosen from the first peak. This approach works better in the moderate sample size or weak signal situations. Empirically, the first peak becomes highest peak when sample size increases or signals become stronger

Value

models

list all model candidates in the model space

B

list the number of bootstrap samples that have been used

lack_of_fit_matrix

list a matrix of Qs for all model candidates (in columns). Each row is for each bootstrap sample

Qd_matrix

list a matrix of QM - QM.tilde for all model candidates. Each row is for each bootrap sample

bandwidth

list the value of bandwidth

model_mat

list a matrix of selected models at each c values in grid (in columns). Each row is for each bootstrap sample

freq_mat

list a matrix of coverage probabilities (frequency/smooth_frequency) of each selected models for a given c value (index)

c

list the adaptive choice of c value from which the parsimonious model is selected

sel_model

list the selected (parsimonious) model given the adaptive c value

Note

Author(s)

Jiming Jiang Jianyang Zhao J. Sunil Rao Thuan Nguyen

References

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
require(fence)
library(snow)
### example 1 ####
data("kidney")
data = kidney[-which.max(kidney$x),]     # Delete a suspicious data point #
data$x2 = data$x^2
data$x3 = data$x^3
data$x4 = data$x^4
data$D = data$sqrt.D.^2
plot(data$y ~ data$x)
full = y~x+x2+x3+x4
# Takes more than 5 seconds to run
# testfh = fence.sae(full, data, B=100, fence="adaptive", method="F-H", D = D)
# testfh$sel_model
# testfh$c

fence documentation built on May 1, 2019, 11:32 p.m.

Related to fence.sae in fence...