4 Regression Models You Should Know! 1?? Linear Regression Countinious dependent variable | Code in R:? lm(y~x) 2?? Poisson regression Counting dependent variable | Code in R:? glm(y ~ x, family="poisson") 3?? Logistic regression Binary dependent variable | Code in R:? glm(y ~ x, family="binomial") 4?? Cox regression Time/event as dependent variable | Code in R:? coxph(Surv(time, status) ~ x) Which regression should also be included? 5??... 6??... 7??... #statistics #rstats #rstudio #r
Thank you very much for the valuable information that you always share. Here are three additional regression models that could be included: 5?? Ridge Regression Used to handle multicollinearity by adding a penalty (L2 regularization) to the magnitude of coefficients. Code in R: glmnet(x, y, alpha = 0) 6?? Lasso Regression Like Ridge, but it adds L1 regularization, which can shrink some coefficients to zero, making it useful for feature selection. Code in R: glmnet(x, y, alpha = 1) 7?? Negative Binomial Regression Used when the dependent variable is count data, and there is overdispersion (variance greater than the mean) in the data. Code in R: glm.nb(y ~ x)
The mixed/hierarchical versions of these models, especially for linear and logistic regressions. When you deal with non-independent data (say n patients visit m physicians, where m<n) you need to account for that, and a natural way of doing it is by employing a mixed model.
So glad you included the Poisson regression and Cox regression. While most will initially encounter Linear and Logistic regression, Poisson and Cox regression are very important for time based studies.
Polynomial Regression, for confusing patterns before jumping to log
Thanks for sharing. Here is nonlinear regression exponential rise to maximum: nlsLM(y ~ y0 + a * (1 - b^x)
How about Non linear regression of z = f(x,y), that will result in a fourth order equation to get the RMS error of less than 0.001%
ordinal and Multinomial regression for ordered and unordered categorical outcomes respectively.
Survival models are surprisingly nonexistent in my own field. I hope to someday use them to investigate some of the attrition issues related to populations I study, but I unfortunately dont have that data yet.
Tslm, lasso and Rudge
Data Analytics Manager | BI & Machine Learning Expert | Python, Data Visualization, Predictive Modeling
4 个月Ridge Regression? Linear model with regularization (L2 penalty) to handle multicollinearity and overfitting.? Code in R:? glmnet(x, y, alpha = 0)? Lasso Regression? Linear model with L1 regularization to shrink coefficients, driving some to zero, useful for feature selection.? Code in R:? glmnet(x, y, alpha = 1)? Multinomial Logistic Regression? Used for a categorical dependent variable with more than two levels (i.e., multinomial outcomes).? Code in R:? multinom(y ~ x, data = your_data)?? What do you reckon