sreg_ber {sregsurvey}R Documentation

Semiparametric Model-Assisted Estimation under a Bernoulli Sampling Design

Description

sreg_ber is used to estimate the total parameter of a finite population generated from a semi-parametric generalized gamma population under a Bernoulli sampling design.

Usage

sreg_ber(location_formula, scale_formula, data, pi, ...)

Arguments

location_formula

a symbolic description of the systematic component of the location model to be fitted.

scale_formula

a symbolic description of the systematic component of the scale model to be fitted.

data

a data frame, list containing the variables in the model.

pi

numeric, represents the first order probability. Default value is 0.5.

...

further parameters accepted by caret and survey functions.

Value

sampling_design is the name of the sampling design used in the estimation process.

N is the population size.

n is the random sample size used in the estimation process.

first_order_probabilities vector of the first order probabilities used in the estimation process.

sample is the random sample used in the estimation process.

estimated_total_y_sreg is the SREG estimate of the total parameter of the finite population.

Author(s)

Carlos Alberto Cardozo Delgado <cardozorpackages@gmail.com>

References

Cardozo C.A, Alonso C. (2021) Semi-parametric model assisted estimation in finite populations. In preparation.

Cardozo C.A., Paula G., and Vanegas L. (2022). Generalized log-gamma additive partial linear models with P-spline smoothing. Statistical Papers.

Sarndal C.E., Swensson B., and Wretman J. (2003). Model Assisted Survey Sampling. Springer-Verlag.

Examples

#This example use the data set 'apipop' of the survey package.
library(sregsurvey)
library(survey)
library(magrittr)
library(dplyr)
library(gamlss)
data(api)
attach(apipop)
Apipop <- filter(apipop,full!= 'NA')
Apipop <- filter(Apipop, stype == 'H')
Apipop <- Apipop %>% dplyr::select(api00,grad.sch,full)
fit <- sreg_ber(api00 ~  pb(grad.sch), scale_formula = ~ full - 1, data= Apipop, pi=0.2)
fit
# The total population value is
true_total <- sum(Apipop$api00)
# The estimated relative bias in percentage is
round(abs((fit$estimated_total_y_sreg - true_total)/true_total),3)*100

[Package sregsurvey version 0.1.3 Index]