Skip to content

Commit

Permalink
Issue #4 | Remove some instances of categorical forgotten | NB not al…
Browse files Browse the repository at this point in the history
…l commands have been upgraded (Interactive)
  • Loading branch information
eloualiche committed Oct 8, 2019
1 parent b1dbb07 commit ca07e4b
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions R/FixedEffectModels.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ FixedEffect <- function(dt,
fe_formula = fe
for (fe_id in fe_split){
fe_formula = gsub(fe_id, paste0("fe(", fe_id, ")"), fe_formula)
}
}
fe_formula = stringr::str_replace_all(fe_formula, "\\:", "\\&")

# split all the clustering variables
Expand Down Expand Up @@ -121,27 +121,7 @@ FixedEffect <- function(dt,
julia_assign("df_julia", dt_julia)

# create pooled fe variables in the julia dataset: not necessary anymore
# for (iter in seq(1, length(fe_split))){
# # convert to categorical if no fe with continuous interaction
# if (!fe_interact | (classes[ name == fe_split[iter]]$colclass == "factor")){
# if (verbose == T){ message("# converting ", fe_split[iter], " to categorical variable") }
# # pool_cmd = paste0("df_julia[:", fe_split[iter], "]",
# pool_cmd = paste0("df_julia[!, :", fe_split[iter], "]",
# " = categorical(df_julia[!, :",
# fe_split[iter], "]);")
# # message(pool_cmd)
# julia_command(pool_cmd)
# }
# }
if ( stringr::str_length(paste(cluster_split, collapse="")) > 0 ){
for (iter in seq(1, length(cluster_split))){
if (verbose == T){ message("# converting ", fe_split[iter], " to categorical variable") }
pool_cmd = paste0("df_julia[!, :", cluster_split[iter], "]",
" = categorical(df_julia[!, :",
cluster_split[iter], "]);")
julia_command(pool_cmd)
}
}
# commented out!

# Run the regression
if (verbose == T){
Expand Down

0 comments on commit ca07e4b

Please sign in to comment.