compute_PLN_starting_point | R Documentation |

Barebone function to compute starting points for B, M and S when fitting a PLN. Mostly intended for internal use.

```
compute_PLN_starting_point(Y, X, O, w, s = 0.1)
```

`Y` |
Response count matrix |

`X` |
Covariate matrix |

`O` |
Offset matrix (in log-scale) |

`w` |
Weight vector (defaults to 1) |

`s` |
Scale parameter for S (defaults to 0.1) |

The default strategy to estimate B and M is to fit a linear model with covariates `X`

to the response count matrix (after adding a pseudocount of 1, scaling by the offset and taking the log). The regression matrix is used to initialize `B`

and the residuals to initialize `M`

. `S`

is initialized as a constant conformable matrix with value `s`

.

a named list of starting values for model parameter B and variational parameters M and S used in the iterative optimization algorithm of `PLN()`

```
## Not run:
data(barents)
Y <- barents$Abundance
X <- model.matrix(Abundance ~ Latitude + Longitude + Depth + Temperature, data = barents)
O <- log(barents$Offset)
w <-- rep(1, nrow(Y))
compute_PLN_starting_point(Y, X, O, w)
## End(Not run)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.