Skip to content

Commit

Permalink
fixed bug due to changes in MuMIn package
Browse files Browse the repository at this point in the history
  • Loading branch information
Pannier committed Oct 10, 2018
1 parent 0384bac commit a77d0bc
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 17 deletions.
3 changes: 0 additions & 3 deletions .Rprofile

This file was deleted.

2 changes: 1 addition & 1 deletion DESCRIPTION
Expand Up @@ -22,7 +22,7 @@ License: GPL-2
URL: https://github.com/SoerenPannier/emdi
LazyData: true
Copyright: inst/COPYRIGHTS
RoxygenNote: 6.0.1
RoxygenNote: 6.1.0
Imports:
nlme,
moments,
Expand Down
5 changes: 4 additions & 1 deletion R/ebp.R
Expand Up @@ -172,7 +172,10 @@ ebp <- function(fixed,
# Save function call ---------------------------------------------------------

call <- match.call()

if(inherits(call$fixed, "name"))
{
call$fixed <- fixed
}
# Data manipulation and notational framework ---------------------------------
if(!is.null(seed)) {
if (cpus > 1 && parallel_mode != "socket") {
Expand Down
12 changes: 6 additions & 6 deletions R/summary.emdi.R
Expand Up @@ -143,19 +143,19 @@ summary.emdi <- function(object, ...) {
Shapiro_p = c(shapiro_p_res, shapiro_p_ran),
row.names = c("Error", "Random_effect")
)

r_squared <- r.squaredGLMM(object$model)
tempMod <- object$model
tempMod$call$fixed <- object$fixed
r_squared <- r.squaredGLMM(tempMod)
if (is.matrix(r_squared)) {
r_marginal <- r_squared["delta", 1]
r_conditional <- r_squared["delta", 2]
r_marginal <- r_squared[1, 1]
r_conditional <- r_squared[1, 2]
} else {
r_marginal <- r_squared[1]
r_conditional <- r_squared[2]
}
icc_mixed <- icc(object$model)

coeff_det <- data.frame(#R2 = r_squared,
#ICC = icc_mixed,
coeff_det <- data.frame(
Marginal_R2 = r_marginal,
Conditional_R2 = r_conditional,
row.names = ""
Expand Down
4 changes: 2 additions & 2 deletions man/direct.Rd

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

5 changes: 3 additions & 2 deletions man/map_plot.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/write.excel.Rd

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

0 comments on commit a77d0bc

Please sign in to comment.