bildIntegrate {bild} | R Documentation |

Auxiliary function as user interface for `bild`

fitting

bildIntegrate(li=-4,ls=4, epsabs=.Machine$double.eps^.25, epsrel=.Machine$double.eps^.25,limit=100,key=6,lig=-4,lsg=4)

`li` |
lower limit of integration for the log-likelihood. |

`ls` |
upper limit of integration for the log-likelihood. |

`epsabs` |
absolute accuracy requested. |

`epsrel` |
relative accuracy requested. |

`key` |
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: |

`limit` |
integer that gives an upperbound on the number of subintervals in the partition
of ( |

`lig` |
lower limit of integration for the gradient. |

`lsg` |
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.

## It takes a very long time to run #### data=locust, dependence="MC2R" str(locust) 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", integrate=Integ) summary(locust2r_feed1) getAIC(locust2r_feed1) getLogLik(locust2r_feed1) plot(locust2r_feed1)

[Package *bild* version 1.2-0 Index]