Description Usage Arguments Details Value References

View source: R/MSPE_Benchmark.R

This function computes the McJack MSPE estimator of the benchmarked Observed Best Predictor.

1 2 | ```
MSPE_McJack_Benchmark(formula, data, errorvar, weight, A.BPE, K = 1000,
returnMcSpline = TRUE)
``` |

`formula` |
an object of class formula (or one that can be coerced to that class): a symbolic description of the model to be fitted. The variables included in formula must have a length equal to the number of small areas. More about the model specification are given under Details. |

`data` |
optional data frame containing the variable names in |

`errorvar` |
vector containing the variances of the random errors for all small areas. |

`weight` |
vector containing the sampling weights of small areas. If sum of the weights is not 1, the weights are normalized. |

`A.BPE` |
optional BPE estimate of random effects variance. |

`K` |
number of Monte Carlo simulations. Default is 1000. |

`returnMcSpline` |
logical. Returns McSpline MSPE benchmark estimators with McJack (default). |

`formula`

is specified in the form `response ~ predictor`

where the predictor is univariate. `formula`

has an implied intercept term. To remove the intercept term, use either `y ~ x - 1`

or `y ~ 0 + x`

.

If `A.BPE`

is missing, the function computes the BPE from data. User can also provide the true A instead if that is known.

The function will return a list with the following objects.

`McJack_Adj_bench` |
McJack MSPE estimator of the adjusted OBP. |

`McJack_Aug_bench` |
McJack MSPE estimator of the augmented OBP. |

`McSpline_Adj_bench` |
McSpline MSPE estimator of the adjusted OBP. This is returned by default. To turn this feature off, set |

`McSpline_Aug_bench` |
McSpline MSPE estimator of the augmented OBP. This is returned by default. To turn this feature off, set |

Bandyopadhyay R, Jiang J (2017) "Benchmarking the Observed Best Predictor"

Jiang J, Nguyen T, and Rao J. S. (2011), "Best Predictive Small Area Estimation", Journal of the American Statistical Association.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.