- Standardize your input variables (X_m) and target variable (Y_m) by subtracting the mean and dividing by the standard deviation.
- Fit the linear model using the standardized variables.
- The coefficients from this model will be the standardized coefficients.
Effects of linear model estimates
조회 수: 9 (최근 30일)
이전 댓글 표시
Hey everyone!
I have a problem with the interpretation of a linear regression model I generated with the function fitlm. The model has three input variables, stored in the columns of X_m and one target variable which are stored in Y_m.
The model works perfectly fine, however I am trying to find out what the standardizied effect of each of the terms of the linear model is on my target variable. After reading the documentation of fitlm function the p-value seems to only tell me the probaliliy that the certain estimate is not equal to zero.
I have found a similiar question on this topic here in the mathlab cummunity (-> comm_question), but I was not able to solve my problem, since the factors in that perticular quistion have 2 factorsteps each, and my factors have 7 steps in the first column, 16 steps in for the second and four steps in the third column of X_m.
I have attached a file with the matching .csv file to this post
clear
clear all
A=readmatrix('data.csv')
X_m=A(:,1:3);
Y_m=A(:,4);
mdl=fitlm(X_m, Y_m,'poly222','RobustOpts','on');
Any help or hints would be much appreciatet! Thanks in advance
Lukas
댓글 수: 0
답변 (1개)
Kartik Saxena
2024년 1월 15일
Hi,
The 'fitlm' function in MATLAB does not directly provide standardized coefficients, but you can calculate them manually. Here's how you can do it:
To visualize the standardized effects similar to a Pareto chart, you can create a bar chart with the absolute values of the standardized coefficients.
For more information on interpreting linear models in MATLAB, you can refer to the following MathWorks documentation:
I hope this resolves your issue.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 ANOVA에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!