Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LazyLoad: yes
Authors@R:
c(person(given=c("David", "L."),
family="Miller",
role=c("aut")),
role=c("cre")),
person(given="Eric",
family="Rexstad",
role="ctb"),
Expand Down
12 changes: 10 additions & 2 deletions R/varprop_check.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ varprop_check <- function(object){

# make a skeleton for the detection function parameters over all models
parskel <- list()
for(i in seq_along(object$old_model$ddf)){
parskel[[i]] <- object$old_model$ddf[[i]]$par
if(class(object) == "list") {
for(i in seq_along(object$old_model$ddf)){
parskel[[i]] <- object$old_model$ddf[[i]]$par
}
} else if(class(object) == "dsm_varprop"){
parskel[[1]] <- object$old_model$ddf$par
}

# which parameters in the GAM are only in the refit?
Expand All @@ -19,6 +23,10 @@ varprop_check <- function(object){
ddf_corrections <- relist(extra_gam_pars, parskel)

vp_diag <- list()

if(class(object) == "dsm_varprop") {
object$old_model$ddf <- list(object$old_model$ddf)
}

for(ii in seq_along(object$old_model$ddf)){
# get the data in order
Expand Down