Package check result: ERROR Check: examples, Result: ERROR Running examples in ‘PerformanceAnalytics-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: SFM.beta > ### Title: Calculate single factor model (CAPM) beta > ### Aliases: SFM.beta CAPM.beta CAPM.beta.bull CAPM.beta.bear TimingRatio > ### SFM.beta.bull SFM.beta.bear > > ### ** Examples > > > data(managers) > SFM.beta(managers[, "HAM1"], managers[, "SP500 TR"], Rf = managers[, "US 3m TR"]) [1] 0.3900712 > SFM.beta(managers[,1:3], managers[,8:10], Rf=.035/12) Beta : SP500 TR Beta : US 10Y TR Beta : US 3m TR HAM1 0.391 -0.359 0.692 HAM2 0.343 -0.043 4.159 HAM3 0.557 -0.099 4.687 > SFM.beta(managers[,1], managers[,8:10], Rf=.035/12, benchmarkCols=FALSE) HAM1 Beta : SP500 TR 0.391 Beta : US 10Y TR -0.359 Beta : US 3m TR 0.692 > > > SFM.beta.bull(managers[, "HAM2"], + managers[, "SP500 TR"], + Rf = managers[, "US 3m TR"]) [1] 0.5226596 > SFM.beta.bear(managers[, "HAM2"], + managers[, "SP500 TR"], + Rf = managers[, "US 3m TR"]) [1] 0.0698255 > > if(requireNamespace("RobStatTM", quietly = TRUE)) { # CRAN requires conditional execution + betas <- SFM.beta(managers[,1:6], + managers[,8:10], + Rf=.035/12, method="Robust", + family="opt", bb=0.25, max.it=200, digits=4) + betas["HAM1", ] + betas[, "Beta : SP500 TR"] + + SFM.beta.bull(managers[, "HAM2"], + managers[, "SP500 TR"], + Rf = managers[, "US 3m TR"], + method="Robust") + + SFM.beta.bear(managers[, "HAM2"], + managers[, "SP500 TR"], + Rf = managers[, "US 3m TR"], + method="Robust") + } # CRAN can have issues with RobStatTM > > TimingRatio(managers[, "HAM2"], + managers[, "SP500 TR"], + Rf = managers[, "US 3m TR"]) [1] 7.485224 > TimingRatio(managers[, "HAM2"], + managers[, "SP500 TR"], + Rf = managers[, "US 3m TR"], + method="Robust", family="mopt") Error in .coefficients(xRa[, n[1]], xRb[, n[2]], subset, method = method, : "package:RobStatTM" %in% search() || requireNamespace("RobStatTM", .... is not TRUE Calls: TimingRatio ... SFM.coefficients -> apply -> FUN -> .coefficients -> stopifnot Execution halted