BIFIE.derivedParameters {BIFIEsurvey}R Documentation

Statistical Inference for Derived Parameters

Description

This function performs statistical for derived parameters for objects of classes BIFIE.by, BIFIE.correl, BIFIE.crosstab, BIFIE.freq, BIFIE.linreg, BIFIE.logistreg and BIFIE.univar.

Usage

BIFIE.derivedParameters( BIFIE.method, derived.parameters, type=NULL)

## S3 method for class 'BIFIE.derivedParameters'
summary(object,digits=4,...)

## S3 method for class 'BIFIE.derivedParameters'
coef(object,...)

## S3 method for class 'BIFIE.derivedParameters'
vcov(object,...)

Arguments

BIFIE.method

Object of classes BIFIE.by, BIFIE.correl, BIFIE.crosstab, BIFIE.freq, BIFIE.linreg, BIFIE.logistreg or BIFIE.univar (see parnames in the Output of these methods for saved parameters)

derived.parameters

List with R formulas for derived parameters (see Examples for specification)

type

Only applies to BIFIE.correl. In case of type="cov" covariances instead of correlations are used for derived parameters.

object

Object of class BIFIE.derivedParameters

digits

Number of digits for rounding decimals in output

...

Further arguments to be passed

Details

The distribution of derived parameters is derived by the direct calculation using original resampled parameters.

Value

A list with following entries

stat

Data frame with statistics

coef

Estimates of derived parameters

vcov

Covariance matrix of derived parameters

parnames

Parameter names

res_wald

Output of Wald test (global test regarding all parameters)

...

More values

See Also

See also BIFIE.waldtest for multi-parameter tests.

See car::deltaMethod for the Delta method assuming that the multivariate distribution of the parameters is asymptotically normal.

Examples

#############################################################################
# EXAMPLE 1: Imputed TIMSS dataset
#            Inference for correlations and derived parameters
#############################################################################

data(data.timss1)
data(data.timssrep)

# create BIFIE.dat object
bdat <- BIFIEsurvey::BIFIE.data( data.list=data.timss1, wgt=data.timss1[[1]]$TOTWGT,
           wgtrep=data.timssrep[, -1 ] )

# compute correlations
res1 <- BIFIEsurvey::BIFIE.correl( bdat,
            vars=c("ASSSCI", "ASMMAT", "books", "migrant" )  )
summary(res1)
res1$parnames
  ##    [1] "ASSSCI_ASSSCI"   "ASSSCI_ASMMAT"   "ASSSCI_books"    "ASSSCI_migrant"
  ##    [5] "ASMMAT_ASMMAT"   "ASMMAT_books"    "ASMMAT_migrant"  "books_books"
  ##    [9] "books_migrant"   "migrant_migrant"

# define four derived parameters
derived.parameters <- list(
        # squared correlation of science and mathematics
        "R2_sci_mat"=~ I( 100* ASSSCI_ASMMAT^2  ),
        # partial correlation of science and mathematics controlling for books
        "parcorr_sci_mat"=~ I( ( ASSSCI_ASMMAT - ASSSCI_books * ASMMAT_books ) /
                            sqrt(( 1 - ASSSCI_books^2 ) * ( 1-ASMMAT_books^2 ) ) ),
        # original correlation science and mathematics (already contained in res1)
        "cor_sci_mat"=~ I(ASSSCI_ASMMAT),
        # original correlation books and migrant
        "cor_book_migra"=~ I(books_migrant)
        )

# statistical inference for derived parameters
res2 <- BIFIEsurvey::BIFIE.derivedParameters( res1, derived.parameters )
summary(res2)

[Package BIFIEsurvey version 3.6-6 Index]