blog/multiple-linear-regression-made-simple/ #90
Replies: 11 comments 23 replies
-
Merci à vous pour ce article bien détaillé. Puis-je savoir comment afficher l'équation de la droite de regression multiple sur le graphe? merci bien |
Beta Was this translation helpful? Give feedback.
-
Thanks AS for this post. it clarified a lot of issues related to regression analysis. Still I could not clarify one of my doubt. I have data imported to 'R' for a randomised trail having two groups. The dependant variable is continuous (cough score measured by VAS scale) between two groups (experimental and control) and the predictors are mixed - some are continuous (age, Duration of bronchoscopy) and some are categorical (indication - lung cancer versus others). When I will run multilinear regression in R, whether regression should be performed for each group (experimental and control) separately or for the whole data of both groups. "Study Group"(0/1) is one column heading in the excel/csv data set. Whether the "Study Group" to be added as one independent variable in to the model. |
Beta Was this translation helpful? Give feedback.
-
Thanks AS. I faced another issue that I mentioned below.
this suggest that the dependencies "digest" under the "see" package is not installed. Rest all dependencies are installed along with the "install.packages(see) command. Because of this - I am unable to run the check_model() command. Any solution for this. Troubling you again. Thanks in advance. |
Beta Was this translation helpful? Give feedback.
-
Dear AS
Thank you so much for the guidance
I could run the check_model () command successfully. Just attaching the plot I got. I think, except for the normality of residuals & homogeneity of variance (bottom left plot and top right), rest are okay to proceed with multilinear regression.
![Rplot MLR Assumptions](https://user-images.githubusercontent.com/95480609/144734558-3641e062-b94c-4d68-84de-fbc30a9f95e1.jpeg)
Regards
Manoj
|
Beta Was this translation helpful? Give feedback.
-
I am very thankful to the article, codes and the simple explanation it is great work. Looking forward to Quantile regression if it is possible. I do have a big epidemiological with many independent variables, we are studying effect of occupants and home characteristic on indoor air bacteria in five cities in North Europe. data collected in different seasons. However, some of this independent variables have missing data as people did not answer all the questions Model 1 = key factors (city+season) The Dependent variables are bacterial diversity (Shannon index) (contentious) and Bacterial gene copy number (16SrRNA) In Model 1, I don't have missing data of my as independent variable (city or season). Is there right way to deal with missing data in the independent variables ? Another thing one of my dependent variable was not normal distributed ( Bacterial gene copy number (16SrRNA) ). So I have log transformed it. Is log-transformation are often challenging to interpret for journal readers and not relevant for the original, non-transformed data. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4120293/ Thanks for your time. |
Beta Was this translation helpful? Give feedback.
-
In multiple regression with categorical variables do I need to change data type from character to factor type data or I keep them as character when I tested both I got same results. Hesham |
Beta Was this translation helpful? Give feedback.
-
Hi Antoine, Thanks a lot for this blog on R, I find it great! Actually, I am new on R and I am trying to move my first steps (after graduating in a MSc in Epidemiology&Biostat) and most of your articles were of great help.
Many thanks in advance for your kind support. Best regards, |
Beta Was this translation helpful? Give feedback.
-
Hi, I am conducting a study. I am looking at the effect of self-esteem on the interpretation of ambiguous messages and emojis. Participants took part in both conditions. The first they had to rate emojis on a 5-point likert scale, the second they had to rate messages on the same 5-point likert scale. Then their self-esteem was measured by the RSES. Is this a multiple linear regression? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Thank you for this detailed article clarifying all possible aspects of regression! I have some questions regarding correcting the linearity defect in the model. You have mentioned that the relationship between mpg and horsepower is not linear, which can be corrected with log-transformation or something else to correct the model linearity. Thank you once again for the wonderful article! |
Beta Was this translation helpful? Give feedback.
-
Hello Antoine, Thanks for this amazing article. I am conducting an analysis on air routes, where the main goal is to determine which variables affect the efficiency of these routes. One of my independent variables is the time that it takes to go from one city to another, by public transports. With that being said, in some cases there are no public transports that connect the two cities. Since this is not exactly "missing data", I was trying to come up with a way to model the existence of public transports combined with the time. Mathematically, I want to do something like this: efficiency = intercept + b1 * if_public_transports + b2 * if_public_transports * time_public_transports, where "if_public_transports" is a dummy variable: value 1 if public transports exist; 0 otherwise. The reason behind this is because I expect air routes without competition, from other public transports, to be more efficient, since they are expected to attract more passengers. Thus, is very important to keep these two variables somehow. The problem is: I can't run this linear regression because there is a high correlation between the two variables, so I get an error from RStudio (coefficients not defined due to singularities). Moreover, I don't know if this is a valid formula or a valid solution for what I am trying to model. What do you think I should do? |
Beta Was this translation helpful? Give feedback.
-
How to do a linear regression with n different errors in my n x variables and/or in my n y variables? |
Beta Was this translation helpful? Give feedback.
-
blog/multiple-linear-regression-made-simple/
Learn how to run multiple and simple linear regression in R, how to interpret the results and how to verify the conditions of application
https://statsandr.com/blog/multiple-linear-regression-made-simple/
Beta Was this translation helpful? Give feedback.
All reactions