This is a test repository to develop small-area-estimation functions in the survey package.
1.Basic setup of suggest SUMMER in survey package.
-
Workflow of checking the package passing CRAN @Thomas any thoughts?
From the directory where survey sits
R CMD build survey R CMD check survey_4.1-1.tar.gz --as-cran
or from the directory of the survey folder and in R
library(devtools) check(clean_doc = TRUE)
-
We will implement the following models:
-
Fay-Harriot Model with areal level binary data.
Case 1: raw survey input
# data contains the following columns # y: binary outcome # x1, x2: two covariates # area: area indicator (does not need to be integer, internally transformed?) # pw: design weights # additional columns specified and passed to the svydesign() call fit.iid <- smoothArea(formula = y ~ x1 + x2 + f(area, "iid"), data = data, weights = ~pw, ...) fit.spat <- smoothArea(formula = y ~ x1 + x2 + f(area, "bym2", graph = Amat), data = data, weights = ~pw, ...)
Case 2: direct estimates as input
-
More...