Skip to content

Commit

Permalink
compatability with an update to the gam package
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewhooker committed Mar 8, 2018
1 parent 8354ac5 commit b31eda9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: xpose4
Title: Tools for Nonlinear Mixed-Effect Model Building and Diagnostics
Version: 4.6.0.9002
Version: 4.6.1
Authors@R: c(person("Andrew C.","Hooker",role=c("aut","cre","cph"),email="[email protected]"),
person("Mats O.","Karlsson",role=c("aut","cph")),
person("Justin J.","Wilkins",role="aut"),
Expand Down
22 changes: 15 additions & 7 deletions R/xpose.gam.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
#' @param excl4 Covariate exclusion from model 4.
#' @param extra Extra exclusion criteria.
#' @param \dots Used to pass arguments to more basic functions.
#' @return Returned is a \code{\link[gam]{step.gam}} object
#' @return Returned is a \code{\link[gam]{step.Gam}} object. In this object
#' the step-wise-selected model is returned, with up to two additional
#' components. There is an "anova" component
#' corresponding to the steps taken in the search, as well as a
#' "keep" component if the "keep=" argument was supplied in the call.
#' @author E. Niclas Jonsson, Mats Karlsson, Andrew Hooker & Justin Wilkins
#' @seealso \code{\link[gam]{step.gam}}
#' @examples
Expand Down Expand Up @@ -278,16 +282,20 @@ xpose.gam <-
##
if(!is.null(steppit)){
if(is.null(disp)){
if(packageVersion("gam") >= "1.9.1"){
nose1.parm <- step.gam(bam.start, trace = trace, scope, keep = bam.keep)
if(packageVersion("gam") >= "1.15"){
nose1.parm <- step.Gam(bam.start, trace = trace, scope, keep = bam.keep)
} else if(packageVersion("gam") >= "1.9.1"){
nose1.parm <- do.call("step.gam", list(bam.start, trace = trace, scope, keep = bam.keep))
} else {
nose1.parm <- step.gam(bam.start, trace = trace, scope, keep = bam.keep.old.gam)
nose1.parm <- do.call("step.gam", list(bam.start, trace = trace, scope, keep = bam.keep.old.gam))
}
} else {
if(packageVersion("gam") >= "1.9.1"){
nose1.parm <- step.gam(bam.start, trace = trace, scope, keep = bam.keep,scale=disp2)
if(packageVersion("gam") >= "1.15"){
nose1.parm <- step.Gam(bam.start, trace = trace, scope, keep = bam.keep,scale=disp2)
} else if(packageVersion("gam") >= "1.9.1"){
nose1.parm <- do.call("step.gam",list(bam.start, trace = trace, scope, keep = bam.keep,scale=disp2))
} else {
nose1.parm <- step.gam(bam.start, trace = trace, scope, keep = bam.keep.old.gam,scale=disp2)
nose1.parm <- do.call("step.gam",list(bam.start, trace = trace, scope, keep = bam.keep.old.gam,scale=disp2))
}
}
} else {
Expand Down
Binary file removed data/simpraz.xpdb.old.RData
Binary file not shown.
6 changes: 5 additions & 1 deletion man/xpose.gam.Rd

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

0 comments on commit b31eda9

Please sign in to comment.