OldManExcellor
New Member
- Joined
- May 30, 2011
- Messages
- 45
I use Application.LinEst to create a linear regression in VBA. Is there any formula for a weighted linear regression?
names.add "w",w
names.add "x",x
names.add "y",y
b=[LINEST(y*w^0.5,x^{0,1}*w^0.5,0)]
z=[TREND(y*w^0.5,x^{0,1}*w^0.5,,0)*w^-0.5]
Wouldn't that fail if some x = 0?