make.merge: Make an aggregation matrix to perform mergers of firms
Description
Make an aggregation matrix to perform mergers of
firms. The matrix can be post multiplied (matrix multiplication) to
input and output matrices to make merged input and output matrices.
Usage
make.merge(grp, nFirm = NULL, X = NULL)
Arguments
grp
list of length Kg for Kg firms after mergers; each
component of the list is a list with the firm numbers going into this
merger.
nFirm
Number of firms before the mergers
X
A matrix for input or output where the rows corresponds to
the number of firms at the outset
Value
Returns an aggregation matrix of dimension Kg times K where
rows corresponds to new merged firms and colloms are 1 for firms to be
included and 0 for firms excluded in this merged firm.
Details
Either nFirm or X must be present; if both are
present then nFirm must be equal to the number of rows in
X, the number of firms.
# To merge firms 1,3, and 5; and 2 and 4 of 7 firms into 2 new firms# the aggregation matrix is M. Not all firms are involved in a merger.M <- make.merge(list(c(1,3,5), c(2,4)),7)
print(M)