bildIntegrate {bild}R Documentation

Auxiliary for Controlling "bild" Fitting


Auxiliary function as user interface for bild fitting


bildIntegrate(li=-4,ls=4, epsabs=.Machine$double.eps^.25, 



lower limit of integration for the log-likelihood.


upper limit of integration for the log-likelihood.


absolute accuracy requested.


relative accuracy requested.


integer from 1 to 6 for choice of local integration rule for number of Gauss-Kronrod quadrature points. A gauss-kronrod pair is used with:
7 - 15 points if key = 1,
10 - 21 points if key = 2,
15 - 31 points if key = 3,
20 - 41 points if key = 4,
25 - 51 points if key = 5 and
30 - 61 points if key = 6.


integer that gives an upperbound on the number of subintervals in the partition of (li,ls),


lower limit of integration for the gradient.


upper limit of integration for the gradient.


bildIntegrate returns a list of constants that are used to compute integrals based on a Fortran-77 subroutine dqage from a Fortran-77 subroutine package QUADPACK for the numerical computation of definite one-dimensional integrals. The subroutine dqage is a simple globally adaptive integrator in which it is possible to choose between 6 pairs of Gauss-Kronrod quadrature formulae for the rule evaluation component. The source code dqage was modified and re-named dqager, the change was the introduction of an extra variable that allow, in our Fortran-77 subroutines when have a call to dqager, to control for which parameter the integral is computed.

For given values of li and ls, the above-described numerical integration is performed over the interval (li*σ, ls*σ), where σ=\exp(ω)/2 is associated to the current parameter value ω examined by the optim function. In some cases, this integration may generate an error, and the user must suitably adjust the values of li and ls. In case different choices of these quantities all lead to a successful run, it is recommended to retain the one with largest value of the log-likelihood. Integration of the gradient is regulated similarly by lig and lsg.

For datasets where the individual profiles have a high number of observed time points (say, more than 30), use bildIntegrate function to set the integration limits for the likelihood and for the gradient to small values than the default ones, see the example of locust data.

If fitting procedure is complete but when computing the information matrix some NaNs are produced, the change in bildIntegrate function of the default values for the gradient integration limits (lig and lsg) might solve this problem.


A list with the arguments as components.

See Also



## It takes a very long time to run

####  data=locust, dependence="MC2R"                                                   
Integ <- bildIntegrate(li=-2.5,ls=2.5, lig=-2.5, lsg=2.5)                              
locust2r_feed1 <- bild(move~(time+I(time^2))*sex, data=locust,              
    trace=TRUE, subSET=feed=="1", aggregate=sex, dependence="MC2R",                    

[Package bild version 1.2-0 Index]