[SciPy-User] calculate predicted values from regression + confidence intervall

Christian K. ckkart@hoc....
Thu Oct 20 15:50:39 CDT 2011


Am 20.10.11 16:12, schrieb josef.pktd@gmail.com:
> On Thu, Oct 20, 2011 at 5:11 AM, Christian K. <ckkart@hoc.net> wrote:
>>  <josef.pktd <at> gmail.com> writes:
>>>> f(X,Y) = a1-a2*log(X)+a3/Y (inverse power/Arrhenius model from accelerated
>>>> reliability testing)
>>>
>>> your f(X,Y) is still linear in the parameters, a1, a2, a3. So the
>>> linear version still applies.
>>
>> Ok, but then I do not understand how to follow your indications for the
>> prediction interval:
>>
>>>> distributed with mean y = Y = X*beta, and var(y) = X' * cov_beta * X +
>>>> var_u_estimate (dot products for appropriate shapes)
>>
>> X in my case is [X,Y] and cov_beta has a shape of 3x3, since there are 3
>> paramters.
>> Sorry for my ignorance on statistics, I really apppreaciate your help.
> 
> I'm attaching a complete example for the linear in parameters case,
> including the comparison with statsmodels.

Ok, I got it, thank you very much. As I understood, this works for OLS
(only?). What about if I get the covariance matrix from a 2D odr/leastsq
fit from scipy.odr ? I noticed, that the covariance matrices differ by a
constant (large) factor.

Regards, Christian




More information about the SciPy-User mailing list