[R-sig-dyn-mod] confidence interval of EDO estimates by the modFit function

Johannes Ranke jranke at uni-bremen.de
Thu Nov 19 11:10:34 CET 2015


Hi Adriele,

Am Mittwoch, 11. November 2015, 12:00:27 schrieb Adriele Giaretta Biase:
> How can you be calculated confidence interval of EDO estimates 
generated by
> the modFit function?
> 
> Below is the summary :
> 
>        Estimate   Std. Error    t value    Pr(>|t|)
> 
> Beta1   4.285       0.0041         0.411   0.00687
> 
> Beta2   0.082       0.0769         0.530   0.00605
> 
> Beta3   2.041       0.0900         0.411   0.00068
> 
> 
> 
> I can use the t-student distribution returned by the function, 

The t values shown in the summary are the test statistic used in the 
hypothesis test for significant difference from zero, i.e. they should be the 
parameter estimate divided by its standard error like in

R> example(modFit)
R> summary(Fit)
Parameters:
   Estimate Std. Error t value Pr(>|t|)    
r   0.50857    0.01528  33.281 9.83e-11 ***
K  99.44959    0.34627 287.206  < 2e-16 ***
N0  0.09062    0.01941   4.669  0.00117 ** 

In your example output above this is not the case. Did you use the modFit 
function from the FME package?

Yes, it is possible to calculate confidence intervals based on the t 
distribution and the standard errors shown by summary.modFit. As the t-
test incorporated in summary.modFit, this is based on the assumption of 
normal distribution of the estimators. In general this is not a safe 
assumption (i.e. only a pragmatic approximation) for nonlinear models as 
usually fitted using modFit.

For this, you need the quantile function for the t-distribution, and use the 
degrees of freedom contained in your modFit object. I have done this in 
the summary.mkinfit function of my mkin package, which internally uses 
modFit

https://github.com/jranke/mkin/blob/master/R/mkinfit.R#L544

In order to improve the plausibility of the normal approximation for the 
estimators, I am using transformed parameters in the fitting. The 
symmetric confidence intervals obtained for the transformed parameters 
are then transformed back to the parameterisation used in the original 
model formulation.

To get confidence intervals for nonlinear model parameter estimates, it is 
also possible to use likelihood profiling as in the confint.nls function from 
the MASS package (which gives assymetric intervals)

R> example(plot.profile.nls)
R> library(MASS)
R> example(confint.nls)

This is, to my knowledge, not implemented for modFit model objects. Or you 
can use Bayesian inference, e.g. using modMCMC from the FME package. 
Which requires time and expertise on MCMC methods.

Kind regards,

Johannes


> calculating:
> 
> 
> Estimate ± Std. Error * t value,  where:
> 
> CI_95%(Beta1)= (4.285- 0.0041* 0.411 ; 4.285+ 0.0041* 0.411 )
> 
> CI_95%(Beta2)= (0.082- 0.0769* 0.530 ; 0.082+ 0.0769* 0.530)
> 
> CI_95%(Beta3)= (2.041- 0.0900* 0.411; 2.041+ 0.0900* 0.411)
> 
> Why the t distribution values are varying? The degrees of freedom should 
be
> the same (n-p)? where n is the sample size and p is  number of 
parameters
> of the model?
> 
> Or I can use the normal distribution Z (α / 2), eg:
> 
> CI_95%(Beta1)= (4.285- 0.0041* 1.96 ; 4.285+ 0.0041* 1.96 )
> 
> The calculations are always based on symmetric distributions?
> 
> 
>  Thanks in advance,
> 
>        Adriele.

	[[alternative HTML version deleted]]



More information about the R-sig-dynamic-models mailing list