Internal function that does the forward step for the stepwise function.
forward_step_IM(empty_start_dataset, fit, data, formula,
interactive_mode = FALSE, latent_var_current = NULL,
latent_var_toadd = NULL, search = NULL, search_criterion = "AIC",
p_threshold = 0.2, exclude_worse_AIC = TRUE, max_steps = 100,
cv_iter = 5, cv_folds = 10, folds = NULL, Huber_p = 1.345,
classification = FALSE, start_latent_var = start_latent_var,
eps = 0.01, maxiter = 100, family = gaussian, ylim = NULL,
seed = NULL, print = TRUE)
If TRUE, the initial dataset is empty.
Current best fit.
Same parameters as in the stepwise function.
Returns fit, start_latent_var, latent_var_current and latent_var_toadd.