[Numpy-discussion] 2d binning and linear regression
Tue Jun 22 09:13:28 CDT 2010
> What exactly are trying to fit because it is rather bad practice to fit
> a model to some summarized data as you lose the uncertainty in the
> original data?
> If you define your boxes, you can loop through directly on each box and
> even fit the equation:
> model=mu +beta1*obs
> The extension is to fit the larger equation:
> model=mu + boxes + beta1*obs + beta2*obs*boxes
> where your boxes is a indicator or dummy variable for each box.
> Since you are only interested in the box by model term, you probably can
> use this type of model
> model=mu + boxes + beta2*obs*boxes
> However, these models assume that the residual variance is identical for
> all boxes. (That is solved by a mixed model approach.)
I am trying to determine spatially based linear corrections for surface
winds in order to force a wave model. The basic idea is, use satellite
observations from sattelites to determine the errors and the wind, and
reduce them by applying a linear correction prior to forcing the wave model.
I am not sure I understand what you are saying, I am possibly trying to do
what you are describing. i.e. for each box, gather observations, determine
a linear correction, and apply it to the model
model = a*x + b
Does that make sense?
> NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion