ldetS {mgcv} | R Documentation |

## Getting log generalized determinant of penalty matrices

### Description

INTERNAL function calculating the log generalized determinant of penalty matrix S stored blockwise in an Sl list
(which is the output of `Sl.setup`

).

### Usage

```
ldetS(Sl, rho, fixed, np, root = FALSE, repara = TRUE,
nt = 1,deriv=2,sparse=FALSE)
```

### Arguments

`Sl` |
the output of |

`rho` |
the log smoothing parameters. |

`fixed` |
an array indicating whether the smoothing parameters are fixed (or free). |

`np` |
number of coefficients. |

`root` |
indicates whether or not to return the matrix square root, |

`repara` |
if TRUE multi-term blocks will be re-parameterized using |

`nt` |
number of parallel threads to use. |

`deriv` |
order of derivative to use |

`sparse` |
should |

### Value

A list containing:

`ldetS`

: the log-determinant of S.`ldetS1`

: the gradient of the log-determinant of S.`ldetS2`

: the Hessian of the log-determinant of S.`Sl`

: with modified rS terms, if needed and rho added to each block`rp`

: a re-parameterization list.`rp`

: E a total penalty square root such that`t(E)%*%E = S_tot`

(if`root==TRUE`

).

### Author(s)

Simon N. Wood <simon.wood@r-project.org>.

*mgcv*version 1.9-1 Index]