Skip to content

Commit

Permalink
ms: bug fix on the length of non numeric variables. now we can run it…
Browse files Browse the repository at this point in the history
…nercept with one categorical variable
  • Loading branch information
midoshammaa committed Oct 12, 2021
1 parent f57eb9f commit 603d7eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/fitFfm.R
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ fitFfm <- function(data, asset.var, ret.var, date.var, exposure.vars,


# check number & type of exposure; convert character exposures to dummy vars
which.numeric <- sapply(data[, exposure.vars], is.numeric)
which.numeric <- sapply(data[,exposure.vars,drop=FALSE], is.numeric)
exposures.num <- exposure.vars[which.numeric]
exposures.char <- exposure.vars[!which.numeric]
if ((length(exposures.char) > 1) && !addIntercept) {
Expand Down

0 comments on commit 603d7eb

Please sign in to comment.