Running examples in 'antitrust-Ex.R' failed
The error most likely occurred in:

> ### Name: AIDS-Functions
> ### Title: (Nested) AIDS Calibration and Merger Simulation
> ### Aliases: AIDS-Functions aids pcaids pcaids.nests
> 
> ### ** Examples
> 
> ## Simulate a merger between two single-product firms A and B in a
> ## three-firm market (A, B, C). This example assumes that the merger is between
> ## the firms A and B and that A's own-price elasticity is
> ## known.
> ## Source: Epstein and Rubinfeld (2004), pg 9, Table 2.
> 
> 
> prices    <- c(2.9,3.4,2.2) ## optional for aids, unnecessary for pcaids
> shares    <- c(.2,.3,.5)
> 
> 
> ## The following are used by aids but not pcaids
> ## only two of the margins are required to calibrate the demand parameters
> margins <- c(0.33, 0.36, 0.44)
> 
> ## The following are used by pcaids, but not aids
> knownElast<- -3
> mktElast  <- -1
> 
> 
> ## Define ownership using a vector of firm identities
> ownerPre <- c("A","B","C")
> ownerPost <- c("A","A","C")
> 
> ## Alternatively, ownership could be defined using matrices
> #ownerPre=diag(1,length(shares))
> #ownerPost=ownerPre
> #ownerPost[1,2] <- ownerPost[2,1] <- 1
> 
> 
> ## AIDS: the following assumes both prices and margins are known.
> ##       Prices are not needed to estimate price changes
> 
> 
> 
> result.aids <- aids(shares,margins,prices,ownerPre=ownerPre,ownerPost=ownerPost,labels=ownerPre)
> 
> 
> 
> print(result.aids)           # return predicted price change
Warning in .local(object, ...) :
  Slot 'insideSize' is missing. Calculating CV as a percentage change in (aggregate) income
Warning in .local(object, ...) :
  'calcQuantities' yielded all NAs. Using 'calcShares' instead
Warning in .local(object, ...) :
  'calcQuantities' yielded all NAs. Using 'calcShares' instead

Merger simulation results under 'AIDS' demand:

 HHI Change
       1200
 Industry Price Change (%)
                       7.3
 Merging Party Price Change (%)
                             12
 Compensating Marginal Cost Reduction (%)
                                       NA
 Consumer Harm ($)
               7.3
 Producer Benefit ($)
                 0.18
 Difference ($)
            7.2


> summary(result.aids)         # summarize merger simulation

Merger simulation results under 'AIDS' demand:

    pricePre pricePost priceDelta sharesPre sharesPost outputDelta
* A      2.9       3.3         14        20         17       -13.2
* B      3.4       3.8         11        30         28        -6.4
  C      2.2       2.3          4        50         55         9.1

	Notes: '*' indicates merging parties' products.
 	Deltas are percent changes.
	Output is based on revenues.


> 
> elast(result.aids,TRUE)      # returns premerger elasticities
           A          B         C
A -3.0303027  0.7575762  1.262627
B  0.5050508 -2.7777773  1.262627
C  0.5050508  0.7575762 -2.272727
> elast(result.aids,FALSE)     # returns postmerger elasticities
           A          B         C
A -3.3370108  0.8728868  1.454025
B  0.5402877 -2.8999816  1.349594
C  0.4628976  0.6941436 -2.167141
> 
> diversion(result.aids,TRUE)  # return premerger diversion ratios
           A      B          C
A -1.0000000  0.375  0.6250000
B  0.2857143 -1.000  0.7142857
C  0.4000000  0.600 -1.0000000
> diversion(result.aids,FALSE) # return postmerger diversion ratios
           A      B          C
A -1.0000000  0.375  0.6250000
B  0.2857143 -1.000  0.7142857
C  0.4000000  0.600 -1.0000000
> 
> 
> cmcr(result.aids)            #calculate compensating marginal cost reduction
Error in loadNamespace(x) : there is no package called 'MASS'
Calls: cmcr ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted