sreg_stsi: Semiparametric Model-Assisted Estimation under a Stratified...

View source: R/sreg_stsi.R

sreg_stsiR Documentation

Semiparametric Model-Assisted Estimation under a Stratified Sampling with Simple Random Sampling Without Replace in each stratum.

Description

sreg_stsi is used to estimate the total parameter of a finite population generated from a semi-parametric generalized gamma population under a stratified sampling with simple random sampling without-replacement in each stratum.

Usage

sreg_stsi(
  location_formula,
  scale_formula,
  stratum,
  data,
  n,
  ss_sizes,
  allocation_type = "PA",
  aux_x,
  ...
)

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.

stratum

vector, represents the strata of each unit in the population

data

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

n

integer, represents a fixed sample size.

ss_sizes

vector, represents a vector with the sample size in each stratum.

allocation_type

character, there is two choices, proportional allocation, 'PA', and x-optimal allocation,'XOA'. By default is a 'PA', Sarndal et. al. (2003).

aux_x

vector, represents an auxiliary variable to help to calculate the sample sizes by the x-optimum allocation method, Sarndal et. al. (2003). This option is validated only when the argument allocation_type is equal to 'XOA'.

...

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.

H is the number of strata.

Ns is the population strata sizes.

allocation_type is the method used to calculate sample strata sizes.

global_n is the global 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

library(sregsurvey)
library(survey)
library(dplyr)
library(magrittr)
library(gamlss)
data(api)
attach(apipop)
Apipop <- filter(apipop,full!= 'NA')
Apipop <- Apipop %>% dplyr::select(api00,grad.sch,full,stype)
dim(Apipop)
fit <- sreg_stsi(api00~ pb(grad.sch), scale_formula =~ full-1, n=400, stratum='stype', data=Apipop)
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


sregsurvey documentation built on April 11, 2023, 6:06 p.m.