data(manu_abs)
manu_abs$output <- as.factor(manu_abs$output)
manu_abs$isic <- as.factor(manu_abs$isic)
# classical estimation with all pairwise balances and four-part ORs:
res.cla <- bpcPcaTab(manu_abs, obs.ID = "country", row.factor = "output",
col.factor = "isic", value = "value")
summary(res.cla)
biplot(res.cla)
head(res.cla$scores)
res.cla$loadings
res.cla$loadings.clr
# classical estimation with LAB anf 155 as rationing categories
res.cla.select <- bpcPcaTab(manu_abs, obs.ID = "country", row.factor = "output",
col.factor = "isic", value = "value", norm.cat.row = "LAB", norm.cat.col = "155")
summary(res.cla.select)
biplot(res.cla.select)
head(res.cla.select$scores)
res.cla.select$loadings
res.cla.select$loadings.clr
# robust estimation with all pairwise balances and four-part ORs:
res.rob <- bpcPcaTab(manu_abs, obs.ID = "country", row.factor = "output",
col.factor = "isic", value = "value", robust = TRUE)
summary(res.rob)
biplot(res.rob)
head(res.rob$scores)
res.rob$loadings
res.rob$loadings.clr
Run the code above in your browser using DataLab