# [Numpy-discussion] 2d binning and linear regression

Tom Durrant thdurrant@gmail....
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.)
>
> Bruce

Bruce,

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?

Cheers
Tom

>
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100623/e6dde6f3/attachment.html
```