pla.drop_blocks | R Documentation |
Used to pass the indices of the blocks we want to discard.
pla.drop_blocks(object, blocks, ...)
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. |
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. |
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 }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.