Package: trade Check: examples New result: ERROR Running examples in ‘trade-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: Sim-Functions > ### Title: Tariff Simulation With User-Supplied Demand Parameters > ### Aliases: Sim-Functions sim > > ### ** Examples > > ## Calibration and simulation results from a merger between Budweiser and > ## Old Style. Note that the in the following model there is no outside > ## good; BUD's mean value has been normalized to zero. > > ## Source: Epstein/Rubenfeld 2004, pg 80 > > > prodNames <- c("BUD","OLD STYLE","MILLER","MILLER-LITE","OTHER-LITE","OTHER-REG") > owner <-c("BUD","OLD STYLE","MILLER","MILLER","OTHER-LITE","OTHER-REG") > tariff <- c(0,0,0,0,.1,.1) > > price <- c(.0441,.0328,.0409,.0396,.0387,.0497) > > # a list containing price coefficient and mean valuations > demand.param=list(alpha=-48.0457, + meanval=c(0,0.4149233,1.1899885,0.8252482,0.1460183,1.4865730) + ) > > sim.logit <- sim(price,demand="logit",supply="bertrand", demand.param, + owner=owner,tariffPost=tariff,labels=prodNames) Error in validityMethod(as(object, superClass)) : 'weights' must have the same length as 'shares' Calls: sim ... validObject -> anyStrings -> isTRUE -> validityMethod Execution halted