The nRegression package was designed to estimate the minimal sample size required to attain a specific statistical power in the context of linear regression and logistic regression models through simulations.
install.packages('nRegression')
devtools::install_github('srivastavbudugutta/nRegression')