Stepwisefit without the constant term

Hi, does anyone know of a way to force the function stepwisefit to yield a model with NO intercept term?
I would like to remove it from my model, but don't know how

댓글 수: 3

dpb
dpb 2019년 4월 16일
The builtin function doesn't have the facility -- it is an m-file; you could make a local copy and modify the model inside that it uses -- on looking, it does use an explicit solution technique in building the model such that one could remove the constant ones() column.
I've not tried; so whether the following code is general-enough to not blow up if one does this blind fix I've no idea...
You might search on the File Exchange to see if anybody has provided alternate tools...
Does seem like reasonable enhancement request fodder; how likely it would be to percolate to the top of the list I'd guess might be pretty low in our lifetimes, though... :)
Maria445
Maria445 2019년 5월 2일
Thank you for the suggestion! I tried and (temporarily) modified the stepwisefit.m file (as the local copy didn't run). It seems to do the job!
dpb
dpb 2019년 5월 2일
Yeah, it's often a mess to do that (local copies, that is) because they rely on private functions and the like that aren't publicly visible outside the particular directory...

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

제품

릴리스

R2018b

질문:

2019년 4월 16일

댓글:

dpb
2019년 5월 2일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by