data(manu_abs)
manu_USA <- manu_abs[which(manu_abs$country=='USA'),]
manu_USA$output <- as.factor(manu_USA$output)
manu_USA$isic <- as.factor(manu_USA$isic)
# default setting with ln()
bpcTab(manu_USA, row.factor = "output", col.factor = "isic", value = "value")
# logarithm of base 2
bpcTab(manu_USA, row.factor = "output", col.factor = "isic", value = "value",
base = 2)
# for base exp(1) is the result similar to tabCoord():
r <- rbind(c(-1,1,0), c(-1,-1,1))
c <- rbind(c(-1,1,0,0,0), c(-1,-1,1,0,0), c(-1,-1,-1,1,0), c(-1,-1,-1,-1,1))
tabCoord(manu_USA, row.factor = "output", col.factor = "isic", value = "value",
SBPr = r, SBPc = c)
Run the code above in your browser using DataLab