S.fitGREG: Model selection for the GREG based on CME

Description Usage Arguments Value See Also Examples

Description

Function which selects a model for the GREG based on the mean squared error (MSE), based on all possible combinations that may be obtained from a set of p variables.

Usage

1
S.fitGREG(x, Xk, total, prom, weight, p = 1, stratum = NULL, ...)

Arguments

x

data.frame which contains the model’s variables.

Xk

Vector of characters with the names of the co-variables to be used in the model. These must be contained in the columns of x.

total

Total of the auxiliary variable.

prom

Name of the column in x which indicates the variable to estimate.

weight

Expansion factor of each observation.

p

Maximum number of combinations to make with the covariantes. By default p = 1.

stratum

Indicator of the domains in the sample. By default stratum = NULL

...

Argumentos adicional empleado por la función calib.

Value

Returns a data.frame where report is made.

model

List of models resulting from ∑_{i=1}^{p} {{p}\choose{i}}

R2

El R^2 for each model definedo.

mse

Mean squared error obtained in the estimation

See Also

E.GREG

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data('ResultStudent')
attach(ResultStudent)
sampling <- data.frame(student[,c('weight','prop','ses')],
                      Domains(student[["urbanicity"]]),
                      Domains(student[["schooltype"]]))
sampling[["sel"]] <- gl(11,31)
Xk<-c('Rural', 'Urbana','No.Oficial', 'Oficial', 'ses')

S.fitGREG(x = sampling,total = total,Xk = Xk, prom = 'prop',
         weight = 'weight', method = 'linear', p = 3)
S.fitGREG(x = sampling,total = total,Xk = Xk, prom = "prop",
         weight = 'weight',stratum='sel', method = 'linear',p=3)

stalynGuerrero/multisae documentation built on May 30, 2019, 8:44 a.m.