Concisely describes a kott.design object.

desc(deskott, descfun = NULL, ...)

Arguments

deskott

Object of class kott.design containing the replicated survey data.

descfun

Optional description function to be used; must accept a data.frame object as first argument.

Additional parameters to be passed to descfun.

Details

This function prints a concise description (i) of the sampling design for the original survey data and (ii) of the replication process these data have undergone.

The optional argument descfun allows to specify an R function (like head, str, summary, …) to be used to analyse, describe, or summarise the data frame contained in deskott.

Value

The return value depends on the descfun parameter. If not specified (the default option), desc does not return any value.

Examples

data(data.examples) # Creation of a kott.design object: kdes<-kottdesign(data=example,ids=~towcod+famcod,strata=~SUPERSTRATUM, weights=~weight,nrg=15) # Concise description: desc(kdes)
#> DAGJK replicated survey data #> > 15 random groups #> > Stratified 2 - Stage Cluster Sampling design #> - [55] strata #> - [1307,2372] clusters #> #> Call: #> kottdesign(data = example, ids = ~towcod + famcod, strata = ~SUPERSTRATUM, #> weights = ~weight, nrg = 15) #>
# Display first rows of kdes data: desc(kdes,head)
#> DAGJK replicated survey data #> > 15 random groups #> > Stratified 2 - Stage Cluster Sampling design #> - [55] strata #> - [1307,2372] clusters #> #> Call: #> kottdesign(data = example, ids = ~towcod + famcod, strata = ~SUPERSTRATUM, #> weights = ~weight, nrg = 15) #> #> #> ***************************************** #> survey data #> *****************************************
#> towcod famcod key weight stratum SUPERSTRATUM sr regcod procod x1 x2 x3 y1 y2 #> 1 147 3103 1 485.8 803 26 0 7 8 0 0 0 0 0 #> 2 147 3103 2 485.8 803 26 0 7 8 0 0 0 1 1 #> 3 147 3109 3 485.8 803 26 0 7 8 0 0 0 1 1 #> 4 147 3111 4 485.8 803 26 0 7 8 0 0 0 0 0 #> 5 147 3120 5 485.8 803 26 0 7 8 0 0 1 1 1 #> 6 147 3121 6 485.8 803 26 0 7 8 0 0 0 0 0 #> y3 age5c age10c sex marstat z income rgi weight1 weight2 weight3 #> 1 0 3 5 f unmarried 148.32432 1158 12 485.8 485.8 485.8 #> 2 0 2 4 f married 88.57746 1268 12 485.8 485.8 485.8 #> 3 0 3 6 f married 115.07377 108 12 485.8 485.8 485.8 #> 4 0 4 7 f married 86.37647 1700 12 485.8 485.8 485.8 #> 5 0 2 4 f married 110.52172 537 12 485.8 485.8 485.8 #> 6 0 3 5 f married 134.40092 2143 12 485.8 485.8 485.8 #> weight4 weight5 weight6 weight7 weight8 weight9 weight10 weight11 weight12 #> 1 485.8 485.8 485.8 485.8 485.8 485.8 485.8 485.8 75.22406 #> 2 485.8 485.8 485.8 485.8 485.8 485.8 485.8 485.8 75.22406 #> 3 485.8 485.8 485.8 485.8 485.8 485.8 485.8 485.8 75.22406 #> 4 485.8 485.8 485.8 485.8 485.8 485.8 485.8 485.8 75.22406 #> 5 485.8 485.8 485.8 485.8 485.8 485.8 485.8 485.8 75.22406 #> 6 485.8 485.8 485.8 485.8 485.8 485.8 485.8 485.8 75.22406 #> weight13 weight14 weight15 #> 1 691.088 691.088 485.8 #> 2 691.088 691.088 485.8 #> 3 691.088 691.088 485.8 #> 4 691.088 691.088 485.8 #> 5 691.088 691.088 485.8 #> 6 691.088 691.088 485.8
# Ask essential information on kdes internal structure: desc(kdes,str)
#> DAGJK replicated survey data #> > 15 random groups #> > Stratified 2 - Stage Cluster Sampling design #> - [55] strata #> - [1307,2372] clusters #> #> Call: #> kottdesign(data = example, ids = ~towcod + famcod, strata = ~SUPERSTRATUM, #> weights = ~weight, nrg = 15) #> #> #> ***************************************** #> survey data #> ***************************************** #> Classes ‘kott.design’ and 'data.frame': 3000 obs. of 37 variables: #> $ towcod : int 147 147 147 147 147 147 147 147 147 147 ... #> $ famcod : int 3103 3103 3109 3111 3120 3121 3123 3123 3123 3124 ... #> $ key : int 1 2 3 4 5 6 7 8 9 10 ... #> $ weight : num 486 486 486 486 486 ... #> $ stratum : Factor w/ 80 levels "801","802","803",..: 3 3 3 3 3 3 3 3 3 3 ... #> $ SUPERSTRATUM: Factor w/ 55 levels "1","2","3","4",..: 26 26 26 26 26 26 26 26 26 26 ... #> $ sr : int 0 0 0 0 0 0 0 0 0 0 ... #> $ regcod : Factor w/ 3 levels "6","7","10": 2 2 2 2 2 2 2 2 2 2 ... #> $ procod : Factor w/ 10 levels "8","9","10","11",..: 1 1 1 1 1 1 1 1 1 1 ... #> $ x1 : int 0 0 0 0 0 0 0 0 0 0 ... #> $ x2 : int 0 0 0 0 0 0 0 0 0 0 ... #> $ x3 : int 0 0 0 0 1 0 0 0 0 0 ... #> $ y1 : int 0 1 1 0 1 0 1 0 0 1 ... #> $ y2 : int 0 1 1 0 1 0 1 0 0 1 ... #> $ y3 : int 0 0 0 0 0 0 0 0 0 0 ... #> $ age5c : Factor w/ 5 levels "1","2","3","4",..: 3 2 3 4 2 3 1 2 2 3 ... #> $ age10c : Factor w/ 10 levels "1","2","3","4",..: 5 4 6 7 4 5 1 4 4 5 ... #> $ sex : Factor w/ 2 levels "f","m": 1 1 1 1 1 1 2 2 2 1 ... #> $ marstat : Factor w/ 3 levels "married","unmarried",..: 2 1 1 1 1 1 2 1 1 1 ... #> $ z : num 148.3 88.6 115.1 86.4 110.5 ... #> $ income : num 1158 1268 108 1700 537 ... #> $ rgi : int 12 12 12 12 12 12 12 12 12 12 ... #> $ weight1 : num 486 486 486 486 486 ... #> $ weight2 : num 486 486 486 486 486 ... #> $ weight3 : num 486 486 486 486 486 ... #> $ weight4 : num 486 486 486 486 486 ... #> $ weight5 : num 486 486 486 486 486 ... #> $ weight6 : num 486 486 486 486 486 ... #> $ weight7 : num 486 486 486 486 486 ... #> $ weight8 : num 486 486 486 486 486 ... #> $ weight9 : num 486 486 486 486 486 ... #> $ weight10 : num 486 486 486 486 486 ... #> $ weight11 : num 486 486 486 486 486 ... #> $ weight12 : num 75.2 75.2 75.2 75.2 75.2 ... #> $ weight13 : num 691 691 691 691 691 ... #> $ weight14 : num 691 691 691 691 691 ... #> $ weight15 : num 486 486 486 486 486 ... #> - attr(*, "data")= symbol example #> - attr(*, "ids")=Class 'formula' language ~towcod + famcod #> .. ..- attr(*, ".Environment")=<environment: 0x0000000024a67de8> #> - attr(*, "strata")=Class 'formula' language ~SUPERSTRATUM #> .. ..- attr(*, ".Environment")=<environment: 0x0000000024a67de8> #> - attr(*, "weights")=Class 'formula' language ~weight #> .. ..- attr(*, ".Environment")=<environment: 0x0000000024a67de8> #> - attr(*, "self.rep.str")= logi FALSE #> - attr(*, "nrg")= int 15 #> - attr(*, "call")= language kottdesign(data = example, ids = ~towcod + famcod, strata = ~SUPERSTRATUM, weights = ~weight, nrg = 15)
# Creation of a kott.cal.design object: kdescal04p<-kottcalibrate(deskott=kdes,df.population=pop04p, calmodel=~x1+x2+x3-1,partition=~regcod,calfun="logit", bounds=bounds,aggregate.stage=2) # Concise description: desc(kdescal04p)
#> Calibrated DAGJK replicated survey data #> > 15 random groups #> > Stratified 2 - Stage Cluster Sampling design #> - [55] strata #> - [1307,2372] clusters #> #> Call: #> kottcalibrate(deskott = kdes, df.population = pop04p, calmodel = ~x1 + #> x2 + x3 - 1, partition = ~regcod, calfun = "logit", bounds = bounds, #> aggregate.stage = 2) #>
# Display first rows of kdescal04p data: desc(kdescal04p,head)
#> Calibrated DAGJK replicated survey data #> > 15 random groups #> > Stratified 2 - Stage Cluster Sampling design #> - [55] strata #> - [1307,2372] clusters #> #> Call: #> kottcalibrate(deskott = kdes, df.population = pop04p, calmodel = ~x1 + #> x2 + x3 - 1, partition = ~regcod, calfun = "logit", bounds = bounds, #> aggregate.stage = 2) #> #> #> ***************************************** #> survey data #> *****************************************
#> towcod famcod key weight stratum SUPERSTRATUM sr regcod procod x1 x2 x3 y1 y2 #> 1 147 3103 1 485.8 803 26 0 7 8 0 0 0 0 0 #> 2 147 3103 2 485.8 803 26 0 7 8 0 0 0 1 1 #> 3 147 3109 3 485.8 803 26 0 7 8 0 0 0 1 1 #> 4 147 3111 4 485.8 803 26 0 7 8 0 0 0 0 0 #> 5 147 3120 5 485.8 803 26 0 7 8 0 0 1 1 1 #> 6 147 3121 6 485.8 803 26 0 7 8 0 0 0 0 0 #> y3 age5c age10c sex marstat z income rgi weight1 weight2 weight3 #> 1 0 3 5 f unmarried 148.32432 1158 12 485.8 485.8 485.8 #> 2 0 2 4 f married 88.57746 1268 12 485.8 485.8 485.8 #> 3 0 3 6 f married 115.07377 108 12 485.8 485.8 485.8 #> 4 0 4 7 f married 86.37647 1700 12 485.8 485.8 485.8 #> 5 0 2 4 f married 110.52172 537 12 485.8 485.8 485.8 #> 6 0 3 5 f married 134.40092 2143 12 485.8 485.8 485.8 #> weight4 weight5 weight6 weight7 weight8 weight9 weight10 weight11 weight12 #> 1 485.8 485.8 485.8 485.8 485.8 485.8 485.8 485.8 75.22406 #> 2 485.8 485.8 485.8 485.8 485.8 485.8 485.8 485.8 75.22406 #> 3 485.8 485.8 485.8 485.8 485.8 485.8 485.8 485.8 75.22406 #> 4 485.8 485.8 485.8 485.8 485.8 485.8 485.8 485.8 75.22406 #> 5 485.8 485.8 485.8 485.8 485.8 485.8 485.8 485.8 75.22406 #> 6 485.8 485.8 485.8 485.8 485.8 485.8 485.8 485.8 75.22406 #> weight13 weight14 weight15 weight.cal weight.cal1 weight.cal2 weight.cal3 #> 1 691.088 691.088 485.8 485.8000 485.8000 485.8000 485.8000 #> 2 691.088 691.088 485.8 485.8000 485.8000 485.8000 485.8000 #> 3 691.088 691.088 485.8 485.8000 485.8000 485.8000 485.8000 #> 4 691.088 691.088 485.8 485.8000 485.8000 485.8000 485.8000 #> 5 691.088 691.088 485.8 364.4264 378.1313 327.4412 376.3952 #> 6 691.088 691.088 485.8 485.8000 485.8000 485.8000 485.8000 #> weight.cal4 weight.cal5 weight.cal6 weight.cal7 weight.cal8 weight.cal9 #> 1 485.8000 485.8000 485.8000 485.8000 485.8000 485.8000 #> 2 485.8000 485.8000 485.8000 485.8000 485.8000 485.8000 #> 3 485.8000 485.8000 485.8000 485.8000 485.8000 485.8000 #> 4 485.8000 485.8000 485.8000 485.8000 485.8000 485.8000 #> 5 353.0205 338.0826 366.6332 357.7328 352.3313 408.9847 #> 6 485.8000 485.8000 485.8000 485.8000 485.8000 485.8000 #> weight.cal10 weight.cal11 weight.cal12 weight.cal13 weight.cal14 weight.cal15 #> 1 485.8000 485.8000 75.22406 691.0880 691.0880 485.8000 #> 2 485.8000 485.8000 75.22406 691.0880 691.0880 485.8000 #> 3 485.8000 485.8000 75.22406 691.0880 691.0880 485.8000 #> 4 485.8000 485.8000 75.22406 691.0880 691.0880 485.8000 #> 5 394.0674 352.3313 63.43341 574.6311 493.4463 325.5681 #> 6 485.8000 485.8000 75.22406 691.0880 691.0880 485.8000