I am trying to write a code in R to be incorporated in Alteryx. part of the code is
for(var in names(df2)) { 
df1[[paste0('updown_', var)]] <- ifelse((df1[[var]] * 
         coef(summary(mjlogit))[var,"Estimate"])>0, "up", 
         (ifelse((df1[[var]] * coef(summary(mjlogit))[var,"Estimate"])==0, 
                 "zero", "down")))
}
In this I am defining up and down variables to be further used in Model.
and the error I am getting is
Error in coef(summary(mjlogit))[var, "Estimate"] : subscript out of bounds Calls: ifelse
Help will be highly appreciated
 
    