Is there such a thing as a weighted multiple regression?

Landen Miller

Landen Miller

Open question

2022-08-17

Is there such a thing as a weighted multiple regression?
I'm new to linear algebra, but I know how multiple linear regressions work. What I want to do is something slightly different.
As an example, let's say that I have a list of nutrients I want to get every day. Say I have a list of foods, and I want to know how much of each food to eat to get the best fit for my nutrition plan. Assume I'm fine with using a linear model.
However, some nutrients are more important than others. The errors on protein and calcium might be equal in a typical linear regression, but that's no use. Protein has higher priority than calcium (in this model), so I'd want a model that is better fitting to the higher priority points than to the lower ones.
I tried putting weights on the error function, and I end up with a matrix of matrices. At that point, I'm not sure if I'm minimising for the weights or for the coefficients on the nutrients. I think both, but I wasn't sure how to minimise for both at the same time.
Is it possible to solve this with linear algebra, or does this require some numerical approximation solution?

Answer & Explanation

Paulina Horne

Paulina Horne

Beginner2022-08-18Added 10 answers

So here is my understanding of what you have in mind. Let X i ( i = 1... N) represent the total number of units for nutrient i. Each nutrient has a weight w i . Therefore, your objective function is i = 1 N w i X i
But, you don't choose nutrients directly, you choose foods. Let food be represented by the subscript j, j = 1... J, Each food j is associated with a set of nutrients. In particular, suppose that 1 unit of each food has m i j units of nutrient i. Therefore, if you purchase one unit of food, your objective function increases by w i m i j
Finally, let F j represent the amount of food j purchases (or consumed). Then your objective is to choose a consumption set of foods { F j } to maximize your objective function.
m a x { F j } j = 1 J i = 1 N F j w i m i j
Perhaps subject to some budget constraint?

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Inferential Statistics

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?