- using R version 4.5.1 (2025-06-13)
- using platform: x86_64-pc-linux-gnu
- R was compiled by
gcc-14 (Debian 14.3.0-5) 14.3.0
GNU Fortran (Debian 14.3.0-5) 14.3.0
- running under: Debian GNU/Linux forky/sid
- using session charset: UTF-8
- checking for file ‘antitrust/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘antitrust’ version ‘0.99.29’
- package encoding: UTF-8
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking serialization versions ... OK
- checking whether package ‘antitrust’ can be installed ... OK
See the install log for details.
- checking package directory ... OK
- checking for future file timestamps ... OK
- checking ‘build’ directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [0s/1s] OK
- checking whether the package can be loaded with stated dependencies ... [0s/1s] OK
- checking whether the package can be unloaded cleanly ... [0s/1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the namespace can be unloaded cleanly ... [1s/1s] OK
- checking loading without being on the library search path ... [0s/1s] OK
- checking use of S3 registration ... OK
- checking dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... [27s/34s] OK
- checking Rd files ... [1s/1s] OK
- checking Rd metadata ... OK
- checking Rd line widths ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking installed files from ‘inst/doc’ ... OK
- checking files in ‘vignettes’ ... OK
- checking examples ... [1s/1s] ERROR
Running examples in ‘antitrust-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### 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.5
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
- checking for unstated dependencies in vignettes ... OK
- checking package vignettes ... OK
- checking re-building of vignette outputs ... [8s/10s] OK
- checking PDF version of manual ... [10s/12s] OK
- checking HTML version of manual ... [4s/6s] OK
- checking for non-standard things in the check directory ... OK
- DONE
Status: 1 ERROR