Skip to content
Merged
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
6 changes: 6 additions & 0 deletions R/checkFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@

.cocons.check.info <- function(type, info, model.list, data){

if (!is.null(info$lambda)) {
info$lambda.reg <- info$lambda
warning("The regularization parameter lambda is now called lambda.reg . Seee help(coco)")
info$lambda <- NULL
}

if (is.null(info$smooth.limits) & is.formula(model.list[6]$smooth)) {
stop("smooth limits not specified.")
}
Expand Down
4 changes: 2 additions & 2 deletions R/cocons.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#' \eqn{\nu_{l}}, and \eqn{\nu_{u}} are the lower and upper bounds limiting the range of variation of the spatially-varying smoothness, and where \eqn{\boldsymbol{X}_{\ell}} relates to the design matrix defined by the specific models for each of the source of nonstationarity.
#'
#' Lastly, arguments for the \code{"info"} list argument involve: \itemize{
#' \item \code{"lambda.reg"}: (\code{numeric}) a positive scalar specifying the regularization parameter. Larger values regularize highly-smoothed long-tailed covariance functions.
#' \item \code{"lambda.reg"}: (\code{numeric}) a positive scalar specifying the regularization parameter. Larger values discourage highly-smoothed long-tailed covariance functions.
#' \item \code{"lambda.Sigma"}: (\code{numeric}) a positive scalar specifying the penalization parameter for the covariate-driven covariance parameters.
#' \item \code{"lambda.betas"}: (\code{numeric}) a positive scalar specifying the penalization parameter for the covariate-driven spatial mean parameters.
#' \item \code{"sparse.point"}: (\code{numeric}) a cutting point for which smaller coefficients in absolute value will be set to zero after the smoothed L1 penalization optimization. Used in combination with \code{lambda.Sigma} and \code{lambda.betas}. By default, it is set to \code{1e-4}.
Expand Down Expand Up @@ -151,7 +151,7 @@ coco <- function(type,
}

if(any(c(info$lambda.betas,info$lambda.Sigma) > 0) && (is.null(info$sparse.point))){
info$sparse.point <- 1e-4
info$sparse.point <- getOption("cocons.sparse.point")
}

if(T){
Expand Down
2 changes: 0 additions & 2 deletions R/optim.R
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ cocoOptim <- function(coco.object, boundaries = list(),
parallel::setDefaultCluster(cl = cl)
parallel::clusterEvalQ(cl, library("cocons"))
parallel::clusterEvalQ(cl, library("spam"))
#parallel::clusterEvalQ(cl, library("spam64"))
parallel::clusterEvalQ(cl, options(spam.cholupdatesingular = "error"))
parallel::clusterEvalQ(cl, options(spam.cholsymmetrycheck = FALSE))

Expand Down Expand Up @@ -547,7 +546,6 @@ cocoOptim <- function(coco.object, boundaries = list(),
parallel::setDefaultCluster(cl = cl)
parallel::clusterEvalQ(cl, library("cocons"))
parallel::clusterEvalQ(cl, library("spam"))
#parallel::clusterEvalQ(cl, library("spam64"))
parallel::clusterEvalQ(cl, options(spam.cholupdatesingular = "error"))
parallel::clusterEvalQ(cl, options(spam.cholsymmetrycheck = FALSE))

Expand Down
2 changes: 1 addition & 1 deletion man/coco.Rd

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

Loading