Skip to content

Commit

Permalink
Changes for v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewzm committed Apr 13, 2018
1 parent 23ecbae commit b18d448
Show file tree
Hide file tree
Showing 12 changed files with 1,951 additions and 1,865 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: FRK
Type: Package
Title: Fixed Rank Kriging
Version: 0.2.1
Date: 2018-01-12
Date: 2018-04-12
Authors@R: c(
person("Andrew", "Zammit-Mangion", , "andrewzm@gmail.com", c("aut", "cre")))
Maintainer: Andrew Zammit-Mangion <andrewzm@gmail.com>
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export(type)
exportMethods("$")
exportMethods("$<-")
exportMethods("data.frame<-")
exportMethods(info_fit)
exportMethods(predict)
import(Matrix)
import(dplyr)
Expand Down
1 change: 1 addition & 0 deletions R/AllClass.R
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ setClass("TensorP_Basis", contains="Basis_obj", representation(Basis1="Basis",Ba
#' @slot alphahat fixed-effect regression coefficients (estimated)
#' @slot sigma2fshat fine-scale variation scaling (estimated)
#' @slot fs_model type of fine-scale variation (independent or CAR-based). Currently only "ind" is permitted
#' @slot info_fit information on fitting (convergence etc.)
#' @seealso \code{\link{SRE}} for details on how to construct and fit SRE models.
#' @keywords spatial
setClass("SRE",representation(data="list",
Expand Down
7 changes: 6 additions & 1 deletion R/AllGeneric.R
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,13 @@ setGeneric("BAUs_from_points", function(obj,offset = 1e-10)
setGeneric("remove_basis", function(Basis,rmidx)
standardGeneric("remove_basis"))

#' @aliases SRE
#' @title Retrieve fit information for SRE model
#' @description Takes a an object of class \code{SRE} and returns a list containing all the relevant information on parameter estimation
#' @param SRE_model object of class \code{SRE}
#' @export
#' @seealso See \code{\link{SRE}} for more information on the SRE model and available fitting methods.
#' @examples
#' # See example in the help file for SRE
setGeneric("info_fit", function(SRE_model)
standardGeneric("info_fit"))

Expand Down
7 changes: 4 additions & 3 deletions R/SREutils.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#' @param lambda ridge-regression regularisation parameter for when \code{K} is unstructured (0 by default). Can be a single number, or a vector (one parameter for each resolution)
#' @param print_lik flag indicating whether likelihood value should be printed or not after convergence of the EM estimation algorithm
# #' @param use_centroid flag indicating whether the basis functions are averaged over the BAU, or whether the basis functions are evaluated at the BAUs centroid in order to construct the matrix \eqn{S}. The flag can safely be set when the basis functions are approximately constant over the BAUs in order to reduce computational time
#' @param object object of class \code{SRE}
#' @param newdata object of class \code{SpatialPoylgons} indicating the regions over which prediction will be carried out. The BAUs are used if this option is not specified
#' @param obs_fs flag indicating whether the fine-scale variation sits in the observation model (systematic error, Case 1) or in the process model (fine-scale process variation, Case 2, default)
#' @param pred_polys deprecated. Please use \code{newdata} instead
Expand Down Expand Up @@ -280,7 +281,7 @@ SRE.fit <- function(SRE_model,n_EM = 100L, tol = 0.01, method="EM", lambda = 0,

}


#' @rdname SRE
#' @export
SRE.predict <- function(SRE_model, obs_fs = FALSE, newdata = NULL, pred_polys = NULL,
pred_time = NULL, covariances = FALSE) {
Expand Down Expand Up @@ -370,8 +371,8 @@ summary.SRE <- function(object,...) {
setMethod("summary",signature(object="SRE"),summary.SRE)

## Set method for retrieving info_fit
#' @rdname SRE
#' @export
#' @rdname info_fit
#' @aliases info_fit,SRE-method
setMethod("info_fit", signature(SRE_model = "SRE"),
function(SRE_model) {SRE_model@info_fit})

Expand Down
3,671 changes: 1,835 additions & 1,836 deletions R/geometryfns.R

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions demo/00Index
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FRK-meuse FRK-meuse.R Application of FRK to the meuse dataset. This demo replicates the example given in Section 3.2 of the paper on FRK published in JSS.
FRK-meuse-BAUs-as-points FRK-meuse-BAUs-as-points.R Application of FRK to the meuse dataset when treating BAUs as points. This demo replicates the example given in Section 3.2 of the paper on FRK published in JSS.
FRK-meuse Application of FRK to the meuse dataset. This demo replicates the example given in Section 3.2 of the paper on FRK published in JSS.
FRK-meuse-BAUs-as-points Application of FRK to the meuse dataset when treating BAUs as points. This demo replicates the example given in Section 3.2 of the paper on FRK published in JSS.
53 changes: 53 additions & 0 deletions man/Basis.Rd

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

2 changes: 2 additions & 0 deletions man/SRE-class.Rd

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

13 changes: 8 additions & 5 deletions man/SRE.Rd

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

31 changes: 15 additions & 16 deletions man/auto_BAUs.Rd

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

24 changes: 24 additions & 0 deletions man/info_fit.Rd

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

0 comments on commit b18d448

Please sign in to comment.