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.
## Therefore, we keep block 2 and block 3.
pla_obj = pla(OECDGrowth, cor=TRUE, thresholds=0.5)
pla.keep_blocks(pla_obj, c(2,3)) ## keep block 2 and block 3
}
Run the code above in your browser using DataLab