find_best_fp_powers {serosv} | R Documentation |
Returns the powers of the GLM fitted model which has the lowest deviance score.
Description
Refers to section 6.2.
Usage
find_best_fp_powers(data, p, mc, degree, link = "logit")
Arguments
data |
the input data frame, must either have 'age', 'pos', 'tot' columns (for aggregated data) OR 'age', 'status' for (linelisting data) |
p |
a powers sequence. |
mc |
indicates if the returned model should be monotonic. |
degree |
the degree of the model. Recommended to be <= 2. |
link |
the link function. Defaulted to "logit". |
Value
list of 3 elements:
p |
The best power for fp model. |
deviance |
Deviance of the best fitted model. |
model |
The best model fitted |
Examples
df <- hav_be_1993_1994
best_p <- find_best_fp_powers(
df,
p=seq(-2,3,0.1), mc=FALSE, degree=2, link="cloglog"
)
best_p
[Package serosv version 1.1.0 Index]