MATLAB: Force the intercept of a regression to be a combination of the coefficients fitlmlinear regressionwilkinson I'd like to run a linear regression of the form y = a + b*x1 + c*x2, where the intercept a is equal to b+c. How can I set this condition in fitlm using the Wilkinson notation? Best Answer Ok I solved it using fmincon Related SolutionsMATLAB: How to force the intercept of a regression line to zero There are 2 main ways you can do this:dlm = fitlm(X,y,'Intercept',false);or using Wilkinson notation:dlm = fitlm(X,y,'y~x1-1');I would highly suggest learning the Wilkinson notation, as this allows you to fit models and specify the form of the equation you would like to fit. MATLAB: How to interpret statistics from glmfit For interpreting the b values from a logistic regression, this pretty detailed explanation might be helpful. Related QuestionCalculating the Regression CoefficientAverage and new observation confidence bounds for predicting Non linear modelsPolyfit – Forcing a non-zero intercept
Best Answer