Skip to content

Commit

Permalink
Merge pull request #27 from gpw13/set_reml
Browse files Browse the repository at this point in the history
Pass REML flag to `lme4::lmer()`
  • Loading branch information
v-a-s-a authored Oct 7, 2024
2 parents 5fb8417 + 01d6feb commit e8e5d67
Show file tree
Hide file tree
Showing 40 changed files with 169 additions and 97 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ License: GPL-3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.2
RoxygenNote: 7.3.2
URL: https://github.com/gpw13/augury
BugReports: https://github.com/gpw13/augury/issues
Depends:
Expand Down
7 changes: 5 additions & 2 deletions R/predict_lme4_wrappers.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#' [predict_lme4()].
#'
#' @inherit predict_general_mdl params return
#' @param REML Flag passed directly to lme4::lmer(). From `lme4` docs: "logical scalar - Should the estimates be chosen to optimize the REML criterion (as opposed to the log-likelihood)?"
#'
#' @export
predict_lmer <- function(df,
Expand Down Expand Up @@ -36,7 +37,8 @@ predict_lmer <- function(df,
replace_obs = c("missing", "all", "none"),
error_correct = FALSE,
error_correct_cols = NULL,
shift_trend = FALSE) {
shift_trend = FALSE,
REML = TRUE) {
predict_lme4(df = df,
model = lme4::lmer,
formula = formula,
Expand Down Expand Up @@ -65,7 +67,8 @@ predict_lmer <- function(df,
replace_obs = replace_obs,
error_correct = error_correct,
error_correct_cols = error_correct_cols,
shift_trend = shift_trend)
shift_trend = shift_trend,
REML = REML)
}

#' Use a generalized linear mixed-effects model to infill and project data
Expand Down
6 changes: 4 additions & 2 deletions man/fit_aarr_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/fit_forecast_average_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions man/fit_forecast_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/fit_general_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/fit_inla_average_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions man/fit_inla_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/fit_lme4_model.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/forecast_series.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/map_model_behavior.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/merge_average_df.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/merge_prediction.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/predict_aarr.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/predict_average.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/predict_average_fn.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e8e5d67

Please sign in to comment.