pla.drop_blocks {prinvars}R Documentation

Drop Blocks

Description

Used to pass the indices of the blocks we want to discard.

Usage

pla.drop_blocks(object, blocks, ...)

Arguments

object

a pla object.

blocks

a list of numeric values indicating the indices of the blocks that should be removed.

...

further arguments passed to or from other methods.

Value

list of the following attributes:

x

a numeric matrix or data frame containing the reduced set of original variables.

cc_matrix

a numeric matrix or data frame which contains the conditional dispersion matrix. Depending on the pla procedure, this is either the conditional covariance matrix or the conditional correlation matrix.

Examples

if(requireNamespace("AER")){
require(AER)
data("OECDGrowth")

pla(OECDGrowth, cor=TRUE, thresholds=0.5)

## we obtain three blocks: (randd), (gdp85,gdp60) and (invest, school,
## popgrowth). Block 1, i.e. the 1x1 block (randd), explains only 5.76% of
## the overall variance. Hence, discarding this block seems appropriate.

pla_obj = pla(OECDGrowth, cor=TRUE, thresholds=0.5)
pla.drop_blocks(pla_obj, c(1)) ## drop block 1
}


[Package prinvars version 1.0.0 Index]