-
Generate dataset where some features are linearly dependant and some not.
-
Fit the dataset to fitlm (linear regression)
-
Look at "mdl.Coefficients"
-
Look at "tStat" (test statistic) to find which variables are significant
0 in pValue means "perfect" model
- The "Estimate" column corresponds to
50 10
y = 50x1 + 10x2 ...
- small tStat and pValue indicate insignificant variables
- Look at "mdl.Rsquared"
High numbers indicate how good the model is and that there is not much noise
H0 (null hypothesis) is what we want to reject.