MATLAB: T test p values for regression coefficients

coefficientlinear modelp-valueregressiont-test

Hi. I am trying to fit a linear model Y= m*X. I wanted to get T test p values for individual regression coefficients. I have seen that the function regstat does provide the T test p values. The problem is that while performing regression , regstat adds a column of ones by itself to the feature set (X). I do not plan to include the column of ones as my model is simple Y=m*X instead of Y=m*X + c. Is there any way or any function I could use to compute the T test p values without including a column of ones in the feature set.
Thanks

Best Answer

Hi. So I found a solution. There is this library posted by someone http://www.mathworks.com/matlabcentral/fileexchange/26169-regstats2
It is an improved version of original regstats function in matlab and also allows p values of coefficient for regression with intercept term.