coldIntegrate {cold} | R Documentation |

## Auxiliary for controlling "cold" fitting

### Description

Auxiliary function as user interface for `cold`

fitting.

### Usage

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

### Arguments

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

### Details

`coldIntegrate`

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`

*`\sigma`

, `ls`

*`\sigma`

), where `\sigma=\exp(\omega)/2`

is associated to the current parameter value `\omega`

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 `coldIntegrate`

function to set the integration limits for the
likelihood and for the gradient to small values
than the default ones.

When the fitting procedure is complete but the computation of the information matrix
produces NaNs, changing in `coldIntegrate`

function the default values for the gradient
integration limits (`lig`

and `lsg`

) might solve this problem.

### Value

A list with the arguments as components.

### See Also

### Examples

```
##### data= seizure
Integ <- coldIntegrate(li = -3.5, ls = 3.5, lig = -3.5, lsg = 3.5)
### AR1R without patient 207
seizure207 <- seizure[seizure$id != 207, ]
seiz1R1.207 <- cold(y~ lage + lbase + v4 + trt + trt:lbase,
random = ~ 1, data = seizure207, dependence = "AR1R", integrate = Integ)
summary (seiz1R1.207)
```

*cold*version 2.0-3 Index]