rsquaredacademy / olsrr

Tools for developing OLS regression models
https://olsrr.rsquaredacademy.com/
Other
102 stars 22 forks source link

Unable to output the result using function ols_step_both_p #172

Open yayyb opened 3 years ago

yayyb commented 3 years ago

My code:

in_model <- lm(as.formula(paste("max_def~", paste(att_list2, collapse = "+"))), data = t2) step_wise <- ols_step_both_p(in_model, pent = 0.05, prem = 0.05, details = TRUE )

This is the error message:

Error in data.frame(model = rep(seq_len(all_step), lbetas), predictor = names(betas), : arguments imply differing number of rows: 39, 35

image

aravindhebbali commented 3 years ago

Hi @yayyb Is it possible to share the data (after anonymizing), so that we can debug this further.

wbw111 commented 1 year ago

I met the same problem. Could you tell me how did you solve it?

aravindhebbali commented 1 year ago

Hi @wbw111, is it possible to share a reproducible example that will help us debug the error?