spam/0000755000176200001440000000000014515436433011222 5ustar liggesusersspam/NAMESPACE0000644000176200001440000001536514513524656012456 0ustar liggesusersuseDynLib(spam, .registration = TRUE) importFrom("Rcpp", "evalCpp") #importFrom("grid", "grid.layout", "grid.draw", "unit", "gTree", "gList", "gpar", # "textGrob", "rectGrob", "linesGrob", "yaxisGrob", "xaxisGrob", "pointsGrob", # "editGrob", "grobHeight", "stringHeight", # "plotViewport","viewport","dataViewport", # "vpStack","vpList") import("grid") importFrom("dotCall64", ".C64", "integer_dc", "numeric_dc", "vector_dc") # these are the only functions exported by dotCall64, btw. importFrom("grDevices", "gray", "heat.colors") importFrom("graphics", "axis", "box", "image.default", "par", "points", "polygon", "text") importFrom("methods", "callGeneric", "is", "new", "slot<-", "validObject", "hasArg") importFrom("stats", "optim", "rnorm", "runif", "rbinom", "rchisq", "var", "dist") importFrom("utils", "help", "object.size") # Next two paragraphs are from Matrix.... # Currently, group generics need to be explicitly imported (Bug?): importFrom("methods", #Arith,Compare, Math, Math2, Summary#, Complex ) S3method("all.equal","spam") #S3method("as.matrix.csr","spam") S3method("as.matrix","spam") S3method("as.vector","spam") S3method("determinant","spam") S3method("determinant","spam.chol.NgPeyton") S3method("chol","spam") S3method("diff","spam") S3method("dim<-","spam") S3method("head","spam") S3method("image","spam") S3method("isSymmetric","spam") S3method("plot","spam") S3method("print","spam") S3method("print","spam.chol.NgPeyton") S3method("solve","spam") #S3method("subset_rows","spam") S3method("subset","spam") S3method("summary","spam") S3method("summary","spam.chol.NgPeyton") S3method("print","summary.spam") S3method("print","summary.spam.chol.NgPeyton") S3method("t","spam") S3method("tail","spam") S3method("update","spam.chol.NgPeyton") S3method("cbind","spam") S3method("rbind","spam") # Generic functions export( "spam_random", "validspamobject", # __DEFUNCT__ "is.spam", "spam.version", "spam.Version", "validate_spam", "nearest.dist", "spam_rdist", "spam_rdist.earth", "as.spam.matrix", "as.spam.numeric", "as.spam.spam", "as.spam.dist", "as.spam.chol.NgPeyton", "as.spam.list", "as.vector.spam", "as.matrix.spam", "spam.list", "spam.numeric", "diag.of.spam", "diag.spam", "spam_diag", "diag<-.spam", "diag.spam<-", "rbind.spam", "cbind.spam", "upper.tri.spam", "lower.tri.spam", "t.spam", "dim<-.spam", "pad<-.spam", "isSymmetric.spam", "all.equal.spam", "kronecker.default", "kronecker.spam", "gmult", "diff.spam", "circulant.spam", "toeplitz.spam", "determinant.spam", "determinant.spam.chol.NgPeyton", "det",# << "identical" as base - but with correct determinant() "chol.spam", "solve.spam", "forwardsolve.spam", "backsolve.spam", "update.spam.chol.NgPeyton", "norm.spam", "plot.spam", "display.spam", "image.spam", "print.spam", "summary.spam", "print.spam.chol.NgPeyton", "summary.spam.chol.NgPeyton", "apply.spam", "rmvnorm", "rmvnorm.spam", "rmvnorm.canonical", "rmvnorm.prec", "rmvnorm.const", "rmvnorm.canonical.const", "rmvnorm.prec.const", "rmvnorm.conditional", "rmvnorm.cond", "rmvt", "rmvt.spam", "rgrf", "precmat", "precmat.RW1", "precmat.RW2", "precmat.RWn", "precmat.season", "precmat.IGMRFreglat", "precmat.IGMRFirreglat", "precmat.GMRFreglat", "covmat", "cov.exp", "cov.sph", "cor.sph", "cov.nug", "cov.wu1", "cov.wu2", "cov.wu3", "cov.wend1", "cov.wend2", "cov.mat", "cov.finnmat", "cov.mat12", "cov.mat32", "cov.mat52", "rowSums.spam", "colSums.spam", "rowMeans.spam", "colMeans.spam", "head.spam", "tail.spam", "chol2inv.spam", "mle", "mle.spam", "mle.nomean", "mle.nomean.spam", "neg2loglikelihood", "neg2loglikelihood.nomean", "neg2loglikelihood.spam", "bdiag.spam", "var.spam", "eigen.spam", "eigen_approx", "bandwidth", # ".spam.matmul.mat", # ".spam.matmul", # "solve.spam.mat", # "solve.spam.dummy", "subset.spam", # "subset_rows.spam", "triplet", "as.spam.matrix.csr", # "as.matrix.csr.spam", "as.dgRMatrix.spam", "as.dgCMatrix.spam", "as.spam.dgRMatrix", "as.spam.dgCMatrix", "read.MM", "read.HB", "powerboost", "permutation.spam", "crossprod.spam", "tcrossprod.spam", "map.landkreis", "adjacency.landkreis", "germany.plot", # "germany.info", "grid_trace2", "grid_zoom", "rowpointers<-", "entries<-", "colindices<-", "dimension<-", "cleanup", # "backsolve" "print_nnzpos" ) # export the two classes exportClasses("spam", "spam.chol.NgPeyton") exportMethods( "Math", "Math2", "Summary", # "show", "print", "image", "display", "spam", "as.spam", "isSymmetric", "all.equal", "summary", "length", "length<-", "c", "dim", "dim<-", "pad<-", "rbind", "cbind", "as.spam", "spam", "as.vector", "as.matrix", "determinant", "t", "diag", "diag<-", "upper.tri", "lower.tri", "norm", "rowSums", "rowMeans", "colSums", "colMeans", "head", "tail", "chol", "ordering", "forwardsolve", "backsolve", "solve", "chol2inv", "kronecker", "permutation", "crossprod", "tcrossprod", "[", "[<-", "%*%", "%d*%", "%d+%", "-", "+", "*", "/", "&", "|" ) spam/demo/0000755000176200001440000000000014165277723012154 5ustar liggesusersspam/demo/jss10-figures-table.R0000644000176200001440000002660514165277037015775 0ustar liggesusers# This demo contains the R code to construct the figures and the table of the # JSS article: # "spam: A Sparse Matrix R Package with Emphasis on # MCMC Methods for Gaussian Markov Random Fields" # The code presented here differs in the following points form the actually used # one: # - Very large grid sizes or very high order neighbor structures are not included # here; # - Instead of (100+1) factorization only (50+1) are performed here; # - No figure fine-tuning is done here. # - We had a few additional gc(), just to be sure. # - Minor change due to evolved of 'spam' # SETUP: options(spam.structurebased=TRUE) # just to be sure ###################################################################### # Figure 1: i <- c( 2,4,4,5,5) j <- c( 1,1,2,1,3) A <- spam(0,5,5) A[cbind(i,j)] <- rep(.5, length(i)) A <- t( A)+A+diag.spam(5) U <- chol( A) pivot <- U@pivot B <- A[pivot,pivot] R <- chol( B) U@pivot U@snmember U@supernodes U@entries U@colindices U@colpointers U@rowpointers display( A) display( as.spam( chol(as.matrix( A)))) display( B) display( as.spam(R)) abline( h=-U@supernodes+.5,col=3,lty=2) ###################################################################### # Figure 2: theta1 <- .1 theta2 <- .01 n <- dim( UScounties.storder)[1] USmat <- diag.spam(n) + theta1 * UScounties.storder + theta2 * UScounties.ndorder U <- chol( USmat,memory=list(nnzR=146735)) display( as.spam(U)) text(400,-2200,"MMD\nz=146735\nw=30182\ns=1262",adj=0) U <- chol( USmat, pivot="RCM",memory=list(nnzR=256198,nnzcolindices=140960)) display( as.spam(U)) text(400,-2200,"RCM\nz=256198\nw=140960\ns=1706",adj=0) U <- chol( USmat, pivot=FALSE,memory=list(nnzR=689615,nnzcolindices=96463)) display( as.spam(U)) text(400,-2200,"no permutation\nz=689615\nw=96463\ns=711",adj=0) ###################################################################### # Figure 3: # general parameters for the following figures N <- 50 # would be 100 in the article stsel <- 1 # user.self rPsx <- 1 # for function "system.time" rPsy <- 3 # memory usage rPint <- .0001 # small interval theta1 <- .1 theta2 <- .05 xseq <- ceiling(4 + exp(seq(0.5,to=5.5,by=.5))/2) # would be seq(0,to=6,by=.5) in the article xseql <- length(xseq) table <- array(NA,c(xseql,4)) for (ix in 1:xseql) { egdx <- expand.grid(1:xseq[ix],1:xseq[ix]) Cspam <- nearest.dist( egdx, delta=1., upper=NULL) Dspam <- nearest.dist( egdx, delta=1.5,upper=NULL) mat <- diag.spam(xseq[ix]^2) + theta1 * Cspam + theta2 * Dspam Rprof( memory.profiling=TRUE, interval = rPint) table[ix,1] <- system.time( { ch1 <- chol(mat); for (i in 1:N) ch1 <- chol(mat)} )[stsel] Rprof( NULL) table[ix,2] <- summaryRprof( memory="both")$by.total[rPsx,rPsy] Rprof( memory.profiling=TRUE, interval = rPint) table[ix,3] <- system.time( { ch1 <- chol(mat); for (i in 1:N) ch2 <- update(ch1,mat) } )[stsel] Rprof( NULL) table[ix,4] <- summaryRprof( memory="both")$by.total[rPsx,rPsy] } # Since we have a small N, elements in table might be zero. table <- pmax(table, 0.0001) par(mfcol=c(1,2)) plot(xseq, table[,1], type="l", log="xy", ylim=range(table[,c(1,3)]), xlab="L (log scale)", ylab="seconds (log scale)") lines(xseq, table[,3], lty=2) lines(xseq,table[,1]/table[,3],col=4,lty=3) plot(xseq, table[,2], type="l", log="xy", ylim=range(table[,c(2,4)]+0.01), xlab="L (log scale)", ylab="Mbytes (log scale)") lines(xseq, table[,4], lty=2) lines(xseq,table[,2]/table[,4],col=4,lty=3) ###################################################################### # Figure 4: # general parameters for the following figures N <- 50 # would be 100 in the article stsel <- 1 # user.self rPsx <- 1 # for function "system.time" rPsy <- 3 # memory usage rPint <- .0001 # small interval x <- 50 # was 50 in article maxnn <- 6 # was 6 in article egdx <- expand.grid( 1:(maxnn+1), 1:(maxnn+1)) dval <- sort(unique(nearest.dist( egdx, delta=maxnn)@entries))[-1] dvall <- length( dval) egdx <- expand.grid( 1:x, 1:x) table <- array(NA, c(dvall,5)) for (id in 1:dvall) { mat <- nearest.dist( egdx, delta=dval[id],upper=NULL) mat@entries <- exp(-2*mat@entries) # arbitrary values to get a spd precision matrix table[id,5] <- length(Cspam) Rprof( memory.profiling=TRUE, interval = rPint) table[id,1] <- system.time( { ch1 <- chol(mat); for (i in 1:N) ch1 <- chol(mat)} )[stsel] Rprof( NULL) table[id,2] <- summaryRprof( memory="both")$by.total[rPsx,rPsy] Rprof( memory.profiling=TRUE, interval = rPint) table[id,3] <- system.time( { ch1 <- chol(mat); for (i in 1:N) ch2 <- update(ch1,mat) } )[stsel] Rprof( NULL) table[id,4] <- summaryRprof( memory="both")$by.total[rPsx,rPsy] } # If we have a small N, elements in table might be zero. table <- pmax(table, 0.0001) par(mfcol=c(1,2)) plot( dval, table[,1], type="l", log="xy",ylim=range(table[,c(1,3)]), xlab="distance (log scale)", ylab="seconds (log scale)") lines( dval, table[,3],lty=2) lines( dval, table[,1]/table[,3],col=4,lty=3) plot( dval, table[,2], type="l", log="xy",ylim=range(table[,c(2,4)]), xlab="distance (log scale)", ylab="Mbytes (log scale)") lines( dval, table[,4],lty=2) lines( dval, table[,2]/table[,4],col=4,lty=3) ###################################################################### # Figure 5 In <- diag.spam(nrow(UScounties.storder)) struct <- chol(In + .2 * UScounties.storder + .1 * UScounties.ndorder) len.1 <- 90 # in the article, is set to 180 len.2 <- 50 # in the article, is set to 100 theta.1 <- seq(-.225, to=.515, len=len.1) theta.2 <- seq(-.09, to=.235, len=len.2) grid <- array(NA, c(len.1, len.2)) options(spam.cholupdatesingular="null") for (i in 1:len.1) for(j in 1:len.2) grid[i,j] <- !is.null(update(struct, In + theta.1[i]*UScounties.storder + theta.2[j]* UScounties.ndorder)) image(theta.1, theta.2, grid, xlab=expression(theta[1]), ylab=expression(theta[2]), xlim=c(-.3,.6),ylim=c(-.1,.25),col=c(0,"gray")) abline(v=0,h=0, lty=2) ###################################################################### # Table 1: table <- array(NA,c(9,4)) x <- 50 # was 50 in article egdx <- expand.grid(1:x,1:x) # As above hence shortend gridmat <- diag.spam(x^2) + .2 * nearest.dist( egdx, delta=1.,upper=NULL) + .1 * nearest.dist( egdx, delta=1.5,upper=NULL) # USmat was constructed above. # Generic call first: Rprof( memory.profiling=TRUE, interval = rPint) table[1,1] <- system.time( for (i in 1:N) ch1 <- chol(gridmat) )[stsel] Rprof( NULL) table[1,2] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] Rprof( memory.profiling=TRUE, interval = rPint) table[1,3] <- system.time( for (i in 1:N) ch2 <- chol(USmat) )[stsel] Rprof( NULL) table[1,4] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] # Call a chol.spam directly Rprof( memory.profiling=TRUE, interval = rPint) table[2,1] <- system.time( for (i in 1:N) ch1 <- chol.spam(gridmat))[stsel] Rprof( NULL) table[2,2] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] Rprof( memory.profiling=TRUE, interval = rPint) table[2,3] <- system.time( for (i in 1:N) ch2 <- chol.spam(USmat) )[stsel] Rprof( NULL) table[2,4] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] # Less checking: options(spam.safemode=c(FALSE, FALSE, FALSE)) Rprof( memory.profiling=TRUE, interval = rPint) table[3,1] <- system.time( for (i in 1:N) ch1 <- chol( gridmat) )[stsel] Rprof( NULL) table[3,2] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] Rprof( memory.profiling=TRUE, interval = rPint) table[3,3] <- system.time( for (i in 1:N) ch2 <- chol( USmat) )[stsel] Rprof( NULL) table[3,4] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] options(spam.safemode=c(TRUE, TRUE, TRUE)) # lesser checking options(spam.cholsymmetrycheck=FALSE) Rprof( memory.profiling=TRUE, interval = rPint) table[4,1] <- system.time( for (i in 1:N) ch1 <- chol( gridmat) )[stsel] Rprof( NULL) table[4,2] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] Rprof( memory.profiling=TRUE, interval = rPint) table[4,3] <- system.time( for (i in 1:N) ch2 <- chol( USmat) )[stsel] Rprof( NULL) table[4,4] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] options(spam.cholsymmetrycheck=TRUE) # Pass optimal memory parameters (from above) memory1 = summary(ch1)[1:2] memory2 = summary(ch2)[1:2] Rprof( memory.profiling=TRUE, interval = rPint) table[5,1] <- system.time( for (i in 1:N) ch1 <- chol( gridmat,memory=memory1) )[stsel] Rprof( NULL) table[5,2] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] Rprof( memory.profiling=TRUE, interval = rPint) table[5,3] <- system.time( for (i in 1:N) ch2 <- chol( USmat,memory=memory2) )[stsel] Rprof( NULL) table[5,4] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] # All of the above options(spam.cholsymmetrycheck=FALSE, safemode=c(FALSE,FALSE,FALSE)) Rprof( memory.profiling=TRUE, interval = rPint) table[6,1] <- system.time( for (i in 1:N) ch1 <- chol.spam(gridmat,memory=memory1) )[stsel] Rprof( NULL) table[6,2] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] Rprof( memory.profiling=TRUE, interval = rPint) table[6,3] <- system.time( for (i in 1:N) ch2 <- chol.spam(USmat,memory=memory2) )[stsel] Rprof( NULL) table[6,4] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] # supply the permutation pivot1 <- ch1@pivot pivot2 <- ch2@pivot Rprof( memory.profiling=TRUE, interval = rPint) table[7,1] <- system.time( for (i in 1:N) ch1 <- chol.spam(gridmat,pivot=pivot1, memory=memory1) )[stsel] Rprof( NULL) table[7,2] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] Rprof( memory.profiling=TRUE, interval = rPint) table[7,3] <- system.time( for (i in 1:N) ch1 <- chol.spam(USmat,pivot=pivot2, memory=memory2) )[stsel] Rprof( NULL) table[7,4] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] # Do not check the permutation options(spam.cholpivotcheck=FALSE) Rprof( memory.profiling=TRUE, interval = rPint) table[8,1] <- system.time( for (i in 1:N) ch1 <- chol.spam(gridmat,pivot=pivot1, memory=memory1) )[stsel] Rprof( NULL) table[8,2] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] Rprof( memory.profiling=TRUE, interval = rPint) table[8,3] <- system.time( for (i in 1:N) ch2 <- chol.spam(USmat,pivot=pivot2, memory=memory2) )[stsel] Rprof( NULL) table[8,4] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] # Update only Rprof( memory.profiling=TRUE, interval = rPint) table[9,1] <- system.time( for (i in 1:N) ch1 <- update(ch1,gridmat) )[stsel] Rprof( NULL) table[9,2] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] Rprof( memory.profiling=TRUE, interval = rPint) table[9,3] <- system.time( for (i in 1:N) ch2 <- update(ch2,USmat) )[stsel] Rprof( NULL) table[9,4] <- summaryRprof(memory="both")$by.total[rPsx,rPsy] # assemble the table colnames(table) <- c("grid_time","grid_mem","US_time","US_mem") rownames(table) <- c("Generic chol","chol.spam","safemode", "symmetrycheck","memory","all","reusing pivot","best cast","update only") normed.table <- t( round( t(table[-1,])/table[1,],3)) print( t( round( t(table[-1,])/table[1,],3))) spam/demo/spam.R0000644000176200001440000000157614165276270013244 0ustar liggesusers# This is a simple demo, illustrating the functionality of spam. set.seed(14) nrow <- 5 ncol <- 7 fmat <- matrix(rnorm(nrow*ncol),nrow) smat <- as.spam(fmat) smat[1,] smat[,1] <- 0 as.spam(smat) ssmat <- smat %*% t(smat) b <- c(-2:2) solve(ssmat,b) cholssmat <- chol(ssmat) # works also for large matrices: set.seed(14) nz <- 1000 nrow <- 1000 ncol <- 1000 smat <- diag.spam(1,nrow,ncol) smat[cbind(sample(1:(nrow*ncol),size=nz))] <- runif(nz) smat <- smat %*% t(smat) b <- rnorm(nz) smatinvb <- solve(smat,b) cholssmat <- chol(smat) # displaying matrices opar <- par(no.readonly = TRUE) par(ask=interactive() && (.Device %in% c("X11","GTK","gnome","windows","quartz"))) display(smat, main="'scatterplot'-type display, very efficient") options(spam.imagesize=prod(smat@dimension)+1) display(smat, main="'image'-type display, may be slow and heavy") par(opar) spam/demo/cholesky.R0000644000176200001440000000764214165301156014115 0ustar liggesusers# We illustrate the Cholesky factorization approaches set.seed(14) # first start with a full matrix. xn <- 750 fmat1 <- matrix(rnorm(xn*xn),xn,xn) fmat1 <- t( fmat1) %*% fmat1 smat1 <- as.spam(fmat1) smat2 <- smat1 + diag.spam(xn) # Generic Cholesky tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol( fmat1) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol( smat1) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky, direct call tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol.spam( smat1) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky, without symmetry check options(spam.cholsymmetrycheck=FALSE) tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol.spam( smat1) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky, reusing pivoting tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol.spam( smat1,pivot=ch1@pivot) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky, updating tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- update.spam.chol.NgPeyton( ch1, smat2) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # reset to default options(spam.cholsymmetrycheck=TRUE) # now create a sparse matrix. fmat1[fmat1<3] <- 0 smat1 <- as.spam(fmat1) smat2 <- smat1 + diag.spam(xn) # Generic Cholesky tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol( fmat1) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol( smat1) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky, direct call tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol.spam( smat1) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky, without symmetry check options(spam.cholsymmetrycheck=FALSE) tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol.spam( smat1) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky, reusing pivoting tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol.spam( smat1,pivot=ch1@pivot) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky, updating tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- update.spam.chol.NgPeyton( ch1, smat2) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # reset to default options(spam.cholsymmetrycheck=TRUE) # now create an even sparser matrix. fmat1 <- fmat1+20*diag(xn) fmat1[fmat1<32] <- 0 smat1 <- as.spam(fmat1) smat2 <- smat1 + 1* diag.spam(xn) # Generic Cholesky tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol( fmat1) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol( smat1) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky, direct call tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol.spam( smat1) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky, without symmetry check options(spam.cholsymmetrycheck=FALSE) tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol.spam( smat1) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky, reusing pivoting options(spam.cholsymmetrycheck=FALSE) tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- chol.spam( smat1,pivot=ch1@pivot) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # Sparse Cholesky, updating options(spam.cholsymmetrycheck=FALSE) tmp <- gc(F);Rprof(memory.profiling=TRUE, interval = 0.01) ch1 <- update.spam.chol.NgPeyton( ch1, smat2) Rprof(NULL);print( summaryRprof(memory="both")$by.total) # reset to default options(spam.cholsymmetrycheck=TRUE) spam/demo/jss15-BYM.R0000644000176200001440000001177514165276450013700 0ustar liggesusers# This is the MCMC sampler presented in Section 2.2 of the article: # # Florian Gerber, Reinhard Furrer (2015). Pitfalls in the Implementation # of Bayesian Hierarchical Modeling of Areal Count Data: An Illustration # Using BYM and Leroux Models. Journal of Statistical Software, # Code Snippets, 63(1), 1-32. URL http://www.jstatsoft.org/v63/c01/. # # Note: For illustration we set # number of generated samples: 5'000 # number of burnin samples: 500 # thinning: 10 # This takes 1-2 minutes of computation time. # # In the JSS article we used: # number of generated samples: 300'000 # number of burnin samples: 15'000 # thinning: 20 invisible(readline(prompt = "Type \t to continue : ")) # SETUP: library("spam") options(spam.structurebased=TRUE) # Besag-York-Molie model (BYM) # load data data(Oral); attach(Oral) path <- system.file("demodata/germany.adjacency", package = "spam") A <- adjacency.landkreis(path); n <- dim(A)[1] set.seed(2) # hyper priors hyperA <- c(1, 1); hyperB <- c(0.5, .01) # sampler length, burnin and thinning totalg <- 5000 burnin <- 500 thin <- 10 # variable to store samples upost <- vpost <- array(0, c(totalg, n)) kpost <- array(NA, c(totalg, 2)); accept <- rep(NA, totalg) # initial values upost[1,] <- vpost[1,] <- rep(.001, 544); kpost[1,] <- c(10, 100) # precalculate some quantities eta <- upost[1,] + vpost[1,] C <- exp(eta) * E; diagC <- diag.spam(c(rep(0, n), C)) b <- c( rep(0, n), Y + (eta - 1) * C) Qu <- R <- precmat.IGMRFirreglat(A); pad(Qu) <- c(2 * n, 2 * n) Qv <- as.spam(rbind(cbind( diag(n), -diag(n)), cbind(-diag(n), diag(n)))) Q <- kpost[1,1] * Qu + kpost[1,2] * Qv + diagC # store symbolic cholesky factorization of Q struct <- chol(Q, memory = list(nnzcolindices = 6467)) uRuHalf <- t(upost[1,]) %*% (R %*% upost[1,]) / 2 vvHalf <- t(vpost[1,]) %*% vpost[1,] / 2 postshape <- hyperA + c(n - 1, n) / 2 for (i in 2:totalg) { # update precision kpost[i,] <- rgamma(2, postshape, hyperB + c(uRuHalf, vvHalf)) # find eta tilde etaTilde <- eta for(index in 1:2){ C <- E * exp(etaTilde) diagC <- diag.spam(c(rep(0, n), C)) b <- c(rep(0, 544), Y + (etaTilde - 1) * C) Q <- kpost[i,1] * Qu + kpost[i,2] * Qv + diagC etaTilde <- c(solve.spam(Q, b, Rstruct = struct))[1:n + n] } C <- exp(etaTilde) * E; diagC <- diag.spam(c(rep(0, n), C)) b <- c( rep(0, n), Y + (etaTilde - 1) * C) Q <- kpost[i,1] * Qu + kpost[i,2] * Qv + diagC # simulate proposal x_ <- c(rmvnorm.canonical(1, b, Q, Rstruct = struct)) upost[i,] <- x_[1:n]; eta_ <- x_[1:n + n]; vpost[i,] <- eta_ - upost[i,] uRuHalf_ <- t(upost[i,]) %*% (R %*% upost[i,]) / 2 vvHalf_ <- t(vpost[i,]) %*% vpost[i,] / 2 # calculate acceptance probability etaTilde_ <- eta_ for(index in 1:2){ C_ <- E * exp(etaTilde_) diagC_ <- diag.spam(c(rep(0, n), C_)) b_ <- c(rep(0, 544), Y + (etaTilde_ - 1) * C_) Q_<- kpost[i,1] * Qu + kpost[i,2] * Qv + diagC_ etaTilde_ <- c(solve.spam(Q_, b_, Rstruct = struct))[1:n + n] } C_ <- exp(etaTilde_) * E; diagC_ <- diag.spam(c(rep(0, n), C_)) b_ <- c( rep(0, n), Y + (etaTilde_ - 1) * C_) Q_ <- kpost[i,1] * Qu + kpost[i,2] * Qv + diagC_ logPost_ <- sum(Y * eta_ - E * exp(eta_)) - kpost[i,1] * uRuHalf_ - kpost[i, 2] * vvHalf_ logPost <- sum(Y * eta - E * exp(eta)) - kpost[i,1] * uRuHalf - kpost[i,2] * vvHalf logApproxX_ <- - kpost[i,1] * uRuHalf_ - kpost[i,2] * vvHalf_ - sum(.5 * eta_^2 * C) + sum(b * eta_) logApproxX <- - kpost[i,1] * uRuHalf - kpost[i,2] * vvHalf - sum(.5 * eta^2 * C_) + sum(b_ * eta) logAlpha <- min(0, logPost_ - logPost + logApproxX - logApproxX_) # accept or reject proposal if (log(runif(1)) < logAlpha) { uRuHalf <- uRuHalf_; vvHalf <- vvHalf_ eta <- eta_; b <- b_; C <- C_; accept[i] <- 1 } else{ accept[i] <- 0; upost[i,] <- upost[i-1,]; vpost[i,] <- vpost[i-1,] } # progress report if(i%%500 == 0) cat(paste(i / 50, "%\n", sep = "" )) } ## remove burnin kpost <- kpost[-seq(burnin), ] upost <- upost[-seq(burnin), ] vpost <- vpost[-seq(burnin), ] accept <- accept[-seq(burnin)] ## thinning index <- c(TRUE, rep(FALSE, (thin - 1))) kpost <- kpost[index,] upost <- upost[index,] vpost <- vpost[index,] accept <- accept[index] ## acceptance rate mean(accept) plot(accept, yaxt = "n") axis(2, at = c(0,1), label = c("no", "yes"), las = 2) ## trace and mixing plots for the precision parameters ## kappa_u and kappa_v grid.newpage() grid_trace2(kpost, chain1_lab = expression(log~kappa[u]), chain2_lab = expression(log~kappa[v]), log = TRUE) ## summary statistics of ## kappa_u and kappa_v apply(kpost, 2, summary) par(mfrow = c(1,2)) ## standardized mortality ratios germany.plot(log(Y/E), main = "SMR") ## estimated relative log-risk germany.plot(apply(upost, 2, mean), main = "U | Y, hyper-priors") spam/demo/jss10-example1.R0000644000176200001440000001211214165276226014743 0ustar liggesusers# This demo contains the R code of the example in Section 5.1 of the # JSS article: # "spam: A Sparse Matrix R Package with Emphasis on # MCMC Methods for Gaussian Markov Random Fields" # # Compared to the R code given in the article, here we give: # - improved formatting # - more comments # - the R code to construct the figures # SETUP: library("spam") options(spam.structurebased=TRUE) data("UKDriverDeaths") y <- sqrt(c(UKDriverDeaths)) # square root counts n <- length(y) # n=192 m <- 12 # We want to predict for one season. nm <- n+m # Total length of s and t priorshape <- c(4, 1, 1) # alpha's, as in Rue & Held (2005) priorinvscale <- c(4, 0.1, 0.0005) # beta's # Construct the individual block precisions # (based on unit precision parameters kappa, denoted with k): # Qsy, Qty are trivial: Qsy <- diag.spam(n) pad(Qsy) <- c(n+m, n) # previously: dim(Qsy) <- c(n+m, n) Qty <- Qsy Qst <- spam(0, nm, nm) Qst[cbind(1:n, 1:n)] <- rep(1, n) # The form of Qss is given by (Rue and Held equation 3.59). # Qss can be constructed with a loop: Qss <- spam(0, nm, nm) for (i in 0:(nm-m)) { Qss[i+1:m,i+1:m] <- Qss[i+1:m, i+1:m] + matrix(1,m,m) # Qss[i+1:m,i+1:m] <- Qss[i+1:m, i+1:m] + 1 # for older versions of spam } # Note that for the final version we need: # Qss <- k_s * Qss + k_y * diag.spam(nm) # The form of Qtt is given by (Rue and Held equation 3.40). # Similar approaches to construct Qtt: Qtt <- spam(0,nm,nm) Qtt[cbind(1:(nm-1),2:nm)] <- -c(2,rep(4,nm-3),2) Qtt[cbind(1:(nm-2),3:nm)] <- rep(1,nm-2) Qtt <- Qtt + t( Qtt) diag(Qtt) <- c(1,5,rep(6,nm-4),5,1) # Create temporary kappa and precision matrix to illustrate # adjacency matrix and ordering. k <- c(1,1,1) Qst_yk <- rbind(cbind(k[2]*Qss + k[1]*diag.spam(nm), k[1]*Qst), cbind(k[1]*Qst, k[3]*Qtt + k[1]*diag.spam(nm))) struct <- chol(Qst_yk) # Figure 6: display(Qst_yk) display(struct) # Note that we do not provide the exactly the same ordering # algorithms. Hence, the following is sightly different than # Figure RH4.2. cholQst_yk <- chol(Qst_yk,pivot="RCM") P <- ordering(cholQst_yk) display(Qst_yk[P,P]) # Recall: # k=( kappa_y, kappa_s, kappa_t)' # Gibbs sampler ngibbs <- 500 # Is very fast! burnin <- 10 # > 0 totalg <- ngibbs+burnin set.seed(14) # Initialize parameters: spost <- tpost <- array(0, c(totalg, nm)) kpost <- array(0, c(totalg, 3)) # Starting values: kpost[1,] <- c(.5,28,500) tpost[1,] <- 40 # calculation of a few variables: postshape <- priorshape + c( n/2, (n+1)/2, (n+m-2)/2) # GIBBS' ITERATIONS: timing <- system.time({ for (ig in 2:totalg) { Q <- rbind(cbind(kpost[ig-1,2]*Qss + kpost[ig-1,1]*Qst, kpost[ig-1,1]*Qst), cbind(kpost[ig-1,1]*Qst, kpost[ig-1,3]*Qtt + kpost[ig-1,1]*Qst)) b <- c(kpost[ig-1,1]*Qsy %*% y, kpost[ig-1,1]*Qsy %*% y) tmp <- rmvnorm.canonical(1, b, Q, Lstruct=struct) spost[ig,] <- tmp[1:nm] tpost[ig,] <- tmp[1:nm+nm] tmp <- y-spost[ig,1:n]-tpost[ig,1:n] postinvscale <- priorinvscale + # prior contribution c( sum( tmp^2)/2, # Qyy_st is the identity t(spost[ig,]) %*% (Qss %*% spost[ig,])/2, t(tpost[ig,]) %*% (Qtt %*% tpost[ig,])/2) kpost[ig,] <- rgamma(3, postshape, postinvscale) if( (ig%%10)==0) cat(".") } }) # POSTPROCESSING: cat("\nTotal time:",timing[1],"per iteration:",timing[1]/totalg,"\n") # Eliminate burn-in: kpost <- kpost[-c(1:burnin),] spost <- spost[-c(1:burnin),] tpost <- tpost[-c(1:burnin),] print(summary(kpost)) postquant <- apply(spost+tpost, 2, quantile,c(.025,.975)) postmean <- apply(spost+tpost, 2, mean) postmedi <- apply(spost+tpost, 2, median) ###################################################################### # Figure 7: par(mfcol=c(1,1),mai=c(.6,.8,.01,.01)) plot( y^2, ylim=c(800,2900),xlim=c(0,nm),ylab="Counts") #lines( postmean^2, col=2) lines( postmedi^2, col=2) matlines( t(postquant)^2, col=4,lty=1) legend("topright",legend=c("Posterior median", "Quantiles of posterior sample", "Quantiles of predictive distribution"), bty="n",col=c(2,4,3),lty=1) # Constructing a predictive distribution: ypred <- rnorm( ngibbs*nm, c(spost+tpost),sd=rep( 1/sqrt(kpost[,1]), nm)) dim(ypred) <- c(ngibbs,nm) postpredquant <- apply(ypred, 2, quantile,c(.025,.975)) matlines( t(postpredquant)^2, col=3,lty=1) points(y^2) kpostmedian <- apply(kpost,2,median) par(mfcol=c(1,3),mai=c(.65,.65,.01,.01),cex=.85,mgp=c(2.6,1,0)) matplot( log( kpost), lty=1, type="l",xlab="Index") abline(h=log(kpostmedian),col=3) acf( kpost[,3],ylab=expression(kappa[t])) plot(kpost[,2:3],ylab=expression(kappa[t]),xlab=expression(kappa[s]),cex=.8) abline(h=kpostmedian[3],v=kpostmedian[2],col=3) allkappas <- rbind(apply(kpost,2,mean), apply(kpost,2,median), apply(1/kpost,2,mean), apply(1/kpost,2,median)) colnames(allkappas) <- c("kappa_y", "kappa_s", "kappa_t") rownames(allkappas) <- c("Prec (mean)", "Prec (median)", "Var (mean)", "Var (median) ") print(allkappas,4) spam/demo/jss15-Leroux.R0000644000176200001440000001117514165276475014530 0ustar liggesusers# This is the MCMC sampler presented in Section 3.1 of the article: # # Florian Gerber, Reinhard Furrer (2015). Pitfalls in the Implementation # of Bayesian Hierarchical Modeling of Areal Count Data: An Illustration # Using BYM and Leroux Models. Journal of Statistical Software, # Code Snippets, 63(1), 1-32. URL http://www.jstatsoft.org/v63/c01/. # # Note: For illustration we set # number of generated samples: 5'000 # number of burnin samples: 500 # thinning: 10 # This takes only 1-2 minutes of computation time. # # In the JSS article we used: # number of generated samples: 300'000 # number of burnin samples: 15'000 # thinning: 20 invisible(readline(prompt = "Type \t to continue : ")) # SETUP: library("spam") options(spam.structurebased=TRUE) library("truncdist") # Lereux model - one block, no intercept # load data data(Oral) E <- Oral$E Y <- Oral$Y n <- 544 A <- adjacency.landkreis(system.file("demodata/germany.adjacency", package="spam")) A <- as.matrix(A) # tuning parameters # (influence acceptance rate) lambda.proposal.sd <- 0.070992 # sampler length, burnin and thinning totaln <- 5000 burnin <- 500 thin <- 10 # variable to store samples upost <- array(NA, c(totaln, n)) kpost <- rep(NA,totaln) lpost <- rep(NA,totaln) accept <- array(0, c(totaln, 2), list(NULL, c("U", "lambda"))) # initial values upost[1,] <- rep(c(.1,-.1), 544/2) kpost[1] <- 15 lpost[1] <- .9 accept[1,] <- 1 # precaluclate some quantities R <- precmat.IGMRFirreglat(A) eigenR <- eigen(R); eigenR.value <- eigenR$values; Q <- (1 - lpost[1]) * diag.spam(544) + lpost[1] * R Q.det <- sum(log(lpost[1]* eigenR.value + 1 - lpost[1])) Q.struct <- chol.spam(Q) postshape <- 0.5 * n - 1 # start sampler for (i in 2:totaln) { ## u ## find tilde u u.tilde <- upost[i-1,] C <- E * exp(u.tilde) B <- Y + (u.tilde - 1) * C Q.tmp <- diag.spam(C) + kpost[i-1] * Q u.tilde <- c(solve.spam(Q.tmp, B)) C.tilde <- E * exp(u.tilde) B.tilde <- Y + (u.tilde - 1) * C.tilde Q.tilde <- diag.spam(C.tilde) + kpost[i-1] * Q u_ <- c(rmvnorm.canonical(1, B.tilde, Q.tilde, Rstruct = Q.struct)) u.tilde_ <- u_ C_ <- E * exp(u.tilde_) B_ <- Y + (u.tilde_- 1) * C_ Q.tmp_ <- diag.spam(C_) + kpost[i-1] * Q u.tilde_ <- c(solve.spam(Q.tmp_, B_)) C.tilde_ <- E * exp(u.tilde_) B.tilde_ <- Y + (u.tilde_- 1) * C.tilde_ log.alpha.u <- sum(Y * u_) - sum(E*exp(u_)) - sum(Y * upost[i-1,]) + sum(E*exp(upost[i-1,]) ) + sum(upost[i-1,] * B.tilde_) - .5 * t(upost[i-1,]) %*% (diag(C.tilde_) %*% upost[i-1,]) - sum(u_* B.tilde) + .5 * t(u_) %*% (diag(C.tilde) %*% u_) if(exp(log.alpha.u) > runif(1)){ upost[i,] <- u_ accept[i,1] <- 1 } else{ upost[i,] <- upost[i-1,] } ## kappa kpost[i] <- rgamma(1, shape = postshape, rate = .5 * upost[i,] %*% (Q %*% upost[i,])) ## lambda lambda_ <- rtrunc(n=1, spec="norm", a=0, b=1, mean=lpost[i-1], sd=lambda.proposal.sd) Q_ <- (1 - lambda_) * diag.spam(544) + lambda_ * R Q.det_ <- sum(log(lambda_* eigenR.value + 1 - lambda_)) alpha.lambda <- exp(.5 * (Q.det_ - kpost[i]* upost[i,] %*% (Q_ %*% upost[i,]) - Q.det + kpost[i]* upost[i,] %*% (Q %*% upost[i,]) )) if(alpha.lambda > runif(1)){ lpost[i] <- lambda_ Q <- Q_ Q.det <- Q.det_ accept[i,2] <- 1 }else{ lpost[i] <- lpost[i-1] } # progress report if(i%%500 == 0) cat(paste(i / 50, "%\n", sep = "" )) } # remove burnin kpost <- kpost[-seq(burnin)] upost <- upost[-seq(burnin), ] lpost <- lpost[-seq(burnin)] accept <- accept[-seq(burnin),] # thinning index <- c(TRUE, rep(FALSE, (thin - 1))) kpost <- kpost[index] upost <- upost[index,] lpost <- lpost[index] accept <- accept[index,] # acceptance rate apply(accept, 2, mean) par(mfrow = c(1,2)) plot(accept[,1], yaxt = "n", main = expression(beta)) axis(2, at = c(0,1), label = c("no", "yes"), las = 2) plot(accept[,2], yaxt = "n", main = expression(lambda)) axis(2, at = c(0,1), label = c("no", "yes"), las = 2) # trace and mixing plots for the precision parameters # kappa and lambda grid.newpage(); grid_trace2(log(kpost), lpost, chain1_lab = expression(log~kappa), chain2_lab = expression(lambda)) # summary statistics of # kappa and lambda summary(kpost) summary(lpost) par(mfrow = c(1,2)) ## standardized mortality ratios germany.plot(log(Y/E), main = "SMR") ## estimated relative log-risk germany.plot(apply(upost, 2, mean), main = "U | Y, hyper-priors") spam/demo/timing.R0000644000176200001440000000300314165276237013561 0ustar liggesusers# We construct a few large matrices and we compare how much faster (slower) # we are compared to the full matrix analysis. # Since all the calculation are also done with full matrices, we do not # exaggerate with the sizes. set.seed(14) compare <- function(expr1,expr2,tag=NULL) { if( !is.null(tag)) cat( "Comparing: ", tag, fill=TRUE) print(data.frame(full=system.time( expr1, TRUE)[1:3], sparse=system.time( expr2, TRUE)[1:3], row.names=c("user","system","elapsed"))) } xn <- 1000 xm <- 1200 # first start with a full matrix. fmat1 <- matrix(rnorm(xn*xm),xn,xm) smat1 <- as.spam(fmat1) compare(fmat2 <- t(fmat1), smat2 <- t(smat1), "Transpose") compare(ffmat <- fmat1 %*% fmat2, ssmat <- smat1 %*% smat2, "multiplication") compare( solve(ffmat), solve(ssmat), "solving") compare(rbind(fmat1,fmat1),rbind(smat1,smat1)) compare(cbind(fmat1,fmat1),cbind(smat1,smat1)) # now create a sparse matrix. fmat1[fmat1<3] <- 0 smat1 <- as.spam(fmat1) compare(fmat2 <- t(fmat1), smat2 <- t(smat1), "Transpose") compare(ffmat <- fmat1 %*% fmat2, ssmat <- smat1 %*% smat2, "multiplication") compare(ffmat <- ffmat + diag(xn), ssmat <- ssmat + diag.spam(xn), "add identity") compare(ffmat <- 1:xn %d+% ffmat, ssmat <- 1:xn %d+% ssmat, "add identity quicker") compare( solve(ffmat), solve(ssmat), "solving") summary(ssmat) # compare a few cbind/rbinds compare(rbind(fmat1,fmat1),rbind(smat1,smat1)) compare(cbind(fmat1,fmat1),cbind(smat1,smat1)) spam/demo/00Index0000644000176200001440000000074714165316221013301 0ustar liggesuserscholesky Illustrates the decompostion of the Cholesky factorization spam Explore some properties of the sparse matrix package timing Compare times required to perform operations on full and sparse matrices jss10-figures-table Code to reproduce the figures and the table of the JSS10 article jss10-example1 Code of example 1 of the JSS10 article jss15-BYM Code of BYM sampler in Section 2.2 of the JSS15 article jss15-Leroux Code of Leroux sampler in Section 3.1 of the JSS15 article spam/README0000644000176200001440000000161114064660063012076 0ustar liggesusersVersions of `spam` prior to 1.00 included a LICENSE file that described the license of some Fortran routines incompatible with the general R philosophy. The routines are in src/cholmodified.f. For the packages `SparseM` and `spam`, Esmond Ng and Barry Peyton have very kindly given permission to use their routines under an open source license (2012/03/09 and 2014/08/29). They have requested that their code be credited via the following two publications: Esmond G. Ng and Barry W. Peyton, "Block sparse Cholesky algorithms on advanced uniprocessor computers". SIAM J. Sci. Stat. Comput. 14 (1993), pp. 1034-1056. John R. Gilbert, Esmond G. Ng, and Barry W. Peyton, "An efficient algorithm to compute row and column counts for sparse Cholesky factorization". SIAM J. Matrix Anal. Appl. 15 (1994), pp. 1075-1091. The old license file of `spam` versions <1.0 is in ./inst/0LICENCE spam/LICENSE0000644000176200001440000000016714064660063012230 0ustar liggesusersYEAR: 1996-2008 COPYRIGHT HOLDER: D.C. Sorensen, R.B. Lehoucq, C. Yang, and K. Maschhoff ORGANIZATION: Rice University spam/data/0000755000176200001440000000000014064660063012130 5ustar liggesusersspam/data/USprecip.rda0000644000176200001440000027445414064660063014372 0ustar liggesusers7zXZi"6!Xv])TW"nRʟX^#&'ƯNQyeVlٌ-P3)LY|EGre e9<Ĉ]Ϩn:޿̜|0p?f>¿<E#?\5 n`ZU<ذ 3w9ubH_}茩PD Qja07 B@i' 3ƽ*p`3 kўd6$^E^H!^"oUrd_?T7SHc;S:≐f(M!d{D,z"3$I#2 K(7Wπ|lQ卬߲͆3w:[*OaT=I~,4+!!v 3m`aVEbY[ξT͵#.P d]ep4a6][_` ] Q.L8TY SGgKwzxՠ3b,lHnV9un3 P]8^M\.~.Jǀ6Hዴe><=NLat[6g,hXt  ]Z2\jTU[k}swOHcg( hd֥K+;|{;&{X"d%_pZ&Pb<:Pک&0`| 3,(UO #u:5-OSfq*13Lz^RU0JddIg܄jq:W<`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wɆЩ< >0 YZspam/man/0000755000176200001440000000000014513547656012005 5ustar liggesusersspam/man/allequal.Rd0000644000176200001440000000661114261754561014073 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/allequal.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{allequal} \alias{all.equal.spam} \alias{all.equal,matrix,spam-method} \alias{all.equal,spam,matrix-method} \alias{all.equal,spam,spam-method} \title{Test if Two Sparse Matrices are (Nearly) Equal} \description{Utility to compare two \code{spam} objects testing 'near equality'. Depending on the type of difference, comparison is still made to some extent, and a report of the differences is returned.} \usage{ \S3method{all.equal}{spam}(target, current, tolerance = .Machine$double.eps^0.5, scale = NULL, check.attributes = FALSE,...) } \arguments{ \item{target}{a \code{spam} object.} \item{current}{another \code{spam} object to be compared with \code{target}.} \item{tolerance}{numeric >= 0. Differences smaller than \code{tolerance} are not considered.} \item{scale}{numeric scalar > 0 (or \code{NULL}). See \sQuote{Details}.} \item{check.attributes}{currently not yet implemented.} \item{...}{Further arguments for different methods.} } \value{Either \code{TRUE} or a vector of 'mode' \code{"character"} describing the differences between \code{target} and \code{current}. } \details{ Numerical comparisons for \code{scale = NULL} (the default) are typically on a \emph{relative difference} scale unless the \code{target} values are close to zero or infinite. Specifically, the scale is computed as the average absolute value of \code{target}. If this scale is finite and exceeds \code{tolerance}, differences are expressed relative to it; otherwise, absolute differences are used. If \code{scale} is numeric (and positive), absolute comparisons are made after scaling (dividing) by \code{scale}. Note that if all of scale is sufficiently close to 1 (specifically, within \code{tolerance}), the difference is still reported as being on an absolute scale. Do not use \code{all.equal.spam} directly in \code{if} expressions: either use \code{isTRUE( all.equal.spam(...))} or \code{identical} if appropriate. Cholesky decomposition routines use this function to test for symmetry. A method for \code{matrix-spam} objects is defined as well. There is the additional catch of a zero matrix being represented by one zero element, see \sQuote{Examples} below. } \seealso{\code{\link{isSymmetric.spam}} and \code{\link{cleanup}}.} \examples{ obj <- diag.spam(2) obj[1,2] <- .Machine$double.eps all.equal( diag.spam(2), obj) all.equal( t(obj), obj) all.equal( t(obj), obj*1.1) # We can compare a spam to a matrix all.equal(diag(2),diag.spam(2)) # the opposite does often not make sense, # hence, it is not implemented. all.equal(diag.spam(2),diag(2)) # A zero matrix contains one element: str(spam(0)) # hence all.equal.spam(spam(0,3,3), diag.spam(0,3) ) norm(spam(0,3,3) - diag.spam(0,3) ) } \author{Reinhard Furrer} \keyword{array} spam/man/head.Rd0000644000176200001440000000454714064660063013174 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/headtail.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{head} \alias{head.spam} \alias{head,spam-method} \alias{head,spam.chol.NgPeyton-method} \alias{tail.spam} \alias{tail,spam-method} \alias{tail,spam.chol.NgPeyton-method} \title{ Return the First or Last Part of an Object } \description{ Returns the upper left or lower right part of a \code{\linkS4class{spam}} object. } \usage{ \S4method{head}{spam}(x, n = 6L, m = n, \dots) \S4method{tail}{spam}(x, n = 6L, m = n, addrownums = TRUE, \dots) } \arguments{ \item{x}{a \code{\linkS4class{spam}} object} \item{n}{a single integer. If positive, size for the resulting object: number of elements for a vector (including lists), rows for a matrix or data frame or lines for a function. If negative, all but the \code{n} last/first number of elements of \code{x}.} \item{m}{similar to \code{n} but for the number of columns.} \item{addrownums}{create row and column namves them from the selected elements.} \item{\dots}{arguments to be passed to or from other methods.} } \details{ For matrices, 2-dim tables and data frames, \code{head()} (\code{tail()}) returns the first (last) \code{n} rows and \code{m} columns when \code{n > 0} or all but the last (first) \code{n} rows when \code{n < 0} (with similar behavior for \code{m}). \code{tail()} will add row and column names of the form \code{"[n,]"} and \code{"[,n]"} to the result, so that it looks similar to the last lines and columns of \code{x} when printed. Setting \code{addrownums = FALSE} suppresses this behaviour. A method for \code{\linkS4class{spam.chol.NgPeyton}} objects is exported as well. } \value{ An regular matrix. } \author{ Reinhard Furrer } \examples{ head( precmat.RW2( 10)) tail( precmat.season(n=10, season=3), n=4, m=10) } \keyword{ manip } spam/man/import.Rd0000644000176200001440000000546514064660063013605 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/import.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{import} \alias{import} \alias{read.MM} \alias{read.HB} \title{Read External Matrix Formats} \description{ Read matrices stored in the Harwell-Boeing or MatrixMarket formats. } \usage{ read.HB(file) read.MM(file) } \arguments{ \item{file}{the name of the file to read, as a character scalar. Alternatively, \code{read.HB} and \code{read.MM} accept connection objects.} } \value{A sparse matrix of class \code{spam}.} \details{The names of files storing matrices in the Harwell-Boeing format usually end in \code{".rua"} or \code{".rsa"}. Those storing matrices in the MatrixMarket format usually end in \code{".mtx"}. Currently, only real assembled Harwell-Boeing can be read with \code{read.HB}. Reading MatrixMarket formats is more flexible. However, as entries of \code{spam} matrices are of mode \code{double}, integers matrices are coerced to doubles, patterns lead to matrices containing ones and complex are coerced to the real part thereof. In these aforementioned cases, a warning is issued.\cr MatrixMarket also defines an array format, in which case a (possibly) dense \code{spam} object is return (retaining only elements which are larger than \code{options('spam.eps')}. A warning is issued. } \note{ The functions are based on \code{readHB} and \code{readMM} from the library \code{Matrix} to build the connection and read the raw data. At present, \code{read.MM} is more flexible than \code{readMM}. } \references{ \url{https://math.nist.gov/MatrixMarket/} \url{https://sparse.tamu.edu/} } \examples{ \dontrun{ image(read.MM(gzcon(url( "ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/bcspwr/bcspwr01.mtx.gz")))) } \dontrun{ ## Datasets supplied within Matrix str(read.MM(system.file("external/pores_1.mtx",package = "Matrix"))) str(read.HB(system.file("external/utm300.rua", package = "Matrix"))) str(read.MM(system.file("external/lund_a.mtx", package = "Matrix"))) str(read.HB(system.file("external/lund_a.rsa", package = "Matrix"))) } } \author{Reinhard Furrer based on \code{Matrix} functions by Douglas Bates \email{bates@stat.wisc.edu} and Martin Maechler \email{maechler@stat.math.ethz.ch}} \keyword{IO} \keyword{array} \keyword{algebra} spam/man/permutation.Rd0000644000176200001440000000347014261621355014634 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/permutation.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{permutation} \alias{permutation} \alias{permutation.spam} \alias{permutation,spam-method} \alias{permutation,matrix-method} \title{Permute a Matrix} \description{Row and/or column permutes a (sparse) matrix. } \usage{ permutation.spam(A, P=NULL, Q=NULL, ind=FALSE, check=TRUE) } \arguments{ \item{A}{sparse matrix} \item{P}{vector giving the row permutation.} \item{Q}{vector giving the column permutation.} \item{ind}{are the indices given. See examples.} \item{check}{Should rudimentary checks be performed.} } \value{A permuted matrix. } \details{If P and Q are permutation matrices, the result is PAQ. However, it is also possible to specify the indices and to perform in a very efficient way \code{A[rowind, colind]}, see examples. A row permutation is much faster than a colum permutation. For very large matrices, a double transpose might be faster. The spam option \code{spam.checkpivot} determines if the permutation is verified. } %\references{ %} \seealso{\code{\link{ordering}}, \code{\link{spam.options}}.} \examples{ A <- spam(1:12,3) P <- c(3,1,2) Q <- c(2,3,1,4) permutation(A,P,Q)-A[order(P),order(Q)] permutation(A,P,Q,ind=TRUE)-A[P,Q] } \author{Reinhard Furrer} \keyword{array}spam/man/cleanup.Rd0000644000176200001440000000265514064660063013720 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/cleanup.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{cleanup} \alias{cleanup} \title{Cleaning up sparse matrices} \description{ Eliminates an zeros in a sparse matrix.} \usage{ cleanup(x, eps = getOption("spam.eps")) } \arguments{ \item{x}{a sparse matrix of class \code{spam}.} \item{eps}{numeric scalar > 0. Smaller entries are coerced to zero.} } \details{A sparse matrix may still contain zeros. This function (aliased to \code{as.spam}) filters these values.\cr This often causes confusion when testing such matrices for symmetry or comparing apparently equal matrices with \code{all.equal} (see \sQuote{Examples} below. } \seealso{\code{\link{isSymmetric.spam}} and \code{\link{all.equal.spam}}. } \examples{ A <- diag.spam(2) A[1,2] <- 0 all.equal(A, t(A)) isSymmetric.spam(A) all.equal(cleanup(A), diag.spam(2)) } \author{Reinhard Furrer} \keyword{algebra} spam/man/grid_zoom.Rd0000644000176200001440000000734514114176126014261 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/grid_zoom.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{grid_zoom} \alias{grid_zoom} \title{grid_zoom} \description{This function takes a grob object (e.g. created with package grid) and adds a zoom window. } \usage{ grid_zoom(inputGrob = pointsGrob(runif(200),runif(200)), inputViewport = viewport(name='main'), x = 'topleft', y, just, ratio = c(.3,.4), zoom_xlim, zoom_ylim, rect = TRUE, rect_lwd = 1, rect_fill = 'gray92', draw =TRUE, zoom_fill = 'white', zoom_frame_gp = gpar(lwd = 1), zoom_gp = NULL, zoom_xaxis = xaxisGrob(main = FALSE), zoom_yaxis = NULL) } \arguments{ \item{inputGrob}{A grob object, e.g created with package grid.} \item{inputViewport}{Viewport related to \code{inputGrob}.} \item{x}{Specifies the \code{x} coordinate of the zoom window. Alternatively it can be set to 'topleft', 'topright', 'bootmleft' or 'bootmright'} \item{y}{Specifies the \code{y} coordinate of the zoom window. } \item{just}{Specifies the justification of the zoom window. } \item{ratio}{Specifies size of the zoom window relative to the main window. } \item{zoom_xlim}{Specifies xlim value of the zoom window. } \item{zoom_ylim}{Specifies ylim value of the zoom window. } \item{rect}{Logical, if TRUE a rectangle of the zoom region is draw in the main window. } \item{rect_lwd}{lwd of the rectangle. } \item{rect_fill}{fill of the rectangle. } \item{draw}{logical, if TRUE the returned grob object is also drawn.} \item{zoom_fill}{fill color of the zoom window.} \item{zoom_frame_gp}{gpar() of the frame of the zoom window.} \item{zoom_gp}{gpar() of the inputGrob in the zoom viewport.} \item{zoom_xaxis}{xaxisGrob() to draw for the zoom window.} \item{zoom_yaxis}{yaxisGrob() to draw for the zoom window.} } \value{A grob object.} \details{ A zoom plot does only make sense if all objects of the \code{inputGrob} are specified in \code{native} units. Additional caution me be require for certain grobs: e.g. a zoom of a circleGrob() is problematic if the x and y axis are stretched by a different amount. } %\references{} \seealso{grid_trace2} \examples{ require(grid) ## -- Example 1 -- set.seed(133) grid_zoom(inputGrob = pointsGrob(runif(200), runif(200)), inputViewport = viewport(name = 'main'), zoom_xlim = c(.2, .3), zoom_ylim = c(.2, .3)) ## -- Example 2 -- ## initial plot grid.newpage() vp <- viewport(width=.8, height=.8, clip='on') gt <- gTree(children=gList(polylineGrob(x=c((0:4)/10, rep(.5, 5), (10:6)/10, rep(.5, 5)), y=c(rep(.5, 5), (10:6/10), rep(.5, 5), (0:4)/10), id=rep(1:5, 4), default.units='native', gp=gpar(col=1:5, lwd=3)), pointsGrob(runif(1000), runif(1000),pch='.', gp=gpar(cex=3)), rectGrob(gp=gpar(lwd=3)))) pushViewport(vp) grid.draw(gt) ## plot with zoom window grid.newpage() grid_zoom(inputGrob = gt, inputViewport = vp, x='topright', zoom_xlim=c(.6,.73), zoom_ylim=c(.3,.43),ratio=.4, zoom_xaxis = NULL, zoom_gp = gpar(cex=3)) } \author{Florian Gerber } \keyword{zoom_grid} \keyword{zoom} \keyword{plot} \keyword{grid} spam/man/coerce-methods.Rd0000644000176200001440000000345514064660063015171 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/coerce.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{coerce-methods} \docType{methods} \alias{coerce.spam} \alias{coerce,spam,logical-method} \alias{coerce,spam,matrix-method} \alias{coerce,spam,vector-method} \alias{coerce,spam,list-method} \alias{coerce,spam,integer-method} \title{Force a \code{spam} Object to Belong to a Class} \description{ These functions manage the relations that allow coercing a \code{spam} object to a given class. } \section{Methods}{ \describe{ \item{\code{signature(from = "spam", to = "matrix")}}{ this is essentially equivalent to \code{as.matrix(object)}. } \item{\code{signature(from = "spam", to = "list")}}{ this is essentially equivalent to \code{triplet(object)}. } \item{\code{signature(from = "spam", to = "vector")}}{ this is essentially equivalent to \code{object@entries} (\code{structurebased=TRUE}) or \code{c(object)}. } \item{\code{signature(from = "spam", to = "logical")}}{ the entries are forced to logicals (nonzeros only in case of \code{structurebased=TRUE}). } \item{\code{signature(from = "spam", to = "integer")}}{ the entries are forced to integers (nonzeros only in case of \code{structurebased=TRUE}). } }} \examples{ ifelse( diag.spam(2)*c(0,1), TRUE, FALSE) } \keyword{methods} spam/man/spam-defunct.Rd0000644000176200001440000000173514064660063014655 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/defunct.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{spam-defunct} \alias{spam-defunct} \alias{validspamobject} \title{Defunct Objects in Package \pkg{spam}} \description{ The functions or variables listed here are defunct, i.e. thorw an error when used. } \usage{ validspamobject(...) } \arguments{ \item{...}{some arguments} } \seealso{ \code{\link{Deprecated}}, \code{\link{Defunct}} } \keyword{misc} spam/man/kronecker.Rd0000644000176200001440000000374614064660063014256 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/kronecker.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{kronecker} \alias{kronecker.default} \alias{kronecker.spam} \alias{kronecker,spam,ANY-method} \alias{kronecker,ANY,spam-method} \alias{kronecker,spam,spam-method} \title{Kronecker Products on Sparse Matrices} \description{Computes the generalised kronecker product of two arrays, \code{X} and \code{Y}.} \usage{ kronecker.spam(X, Y, FUN = "*", make.dimnames = FALSE, ...) } \arguments{ \item{X}{sparse matrix of class \code{spam}, a vector or a matrix.} \item{Y}{sparse matrix of class \code{spam}, a vector or a matrix.} \item{FUN}{a function; it may be a quoted string. See details} \item{make.dimnames}{Provide dimnames that are the product of the dimnames of \code{X} and \code{Y}. } \item{ ...}{optional arguments to be passed to \code{FUN}.} } \value{An array \code{A} with dimensions \code{dim(X) * dim(Y)}.} \details{The sparsity structure is determined by the ordinary \code{\%x\%}. Hence, the result of \code{kronecker(X, Y, FUN = "+")} is different depending on the input. } %\references{} %\seealso{\code{\link{chol}}} \examples{ # Starting with non-spam objects, we get a spam matrix kronecker.spam( diag(2), array(1:4, c(2, 2))) kronecker( diag.spam(2), array(1:4, c(2, 2))) # Notice the preservation of sparsity structure: kronecker( diag.spam(2), array(1:4, c(2, 2)), FUN="+") } \author{Reinhard Furrer} \keyword{array} \keyword{algebra} spam/man/spam-class.Rd0000644000176200001440000001706614064660063014336 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/spam-class.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{spam-class} \docType{class} \alias{spam.class} \alias{spam-class} \alias{as.matrix,spam-method} \alias{as.matrix.spam} \alias{[<-,spam,ANY,ANY,ANY-method} \alias{[<-,spam,matrix,matrix,ANY-method} \alias{[<-,spam,matrix,missing,ANY-method} \alias{[<-,spam,missing,missing,ANY-method} \alias{[<-,spam,missing,vector,ANY-method} \alias{[<-,spam,missing,vector,spam-method} \alias{[<-,spam,spam,missing,ANY-method} \alias{[<-,spam,vector,missing,ANY-method} \alias{[<-,spam,vector,missing,spam-method} \alias{[<-,spam,vector,vector,ANY-method} \alias{[<-,spam,vector,vector,spam-method} \alias{[<-,spam,missing,missing,numeric-method} \alias{[<-,spam,missing,vector,numeric-method} \alias{[<-,spam,vector,missing,numeric-method} \alias{[<-,spam,vector,vector,numeric-method} \alias{[<-,spam,matrix,missing,numeric-method} \alias{[<-,spam,matrix,matrix,numeric-method} \alias{[<-,spam,spam,missing,numeric-method} \alias{[<-,spam,ANY-method} \alias{[,spam,missing,missing,ANY-method} \alias{[,spam,missing,vector,ANY-method} \alias{[,spam,vector,missing,logical-method} \alias{[,spam,vector,missing,missing-method} \alias{[,spam,vector,vector,ANY-method} \alias{[,spam,matrix,missing,missing-method} \alias{[,spam,matrix,missing,logical-method} \alias{[,spam,matrix,matrix,ANY-method} \alias{[,spam,spam,missing,ANY-method} \alias{[,spam,ANY,ANY,ANY-method} \alias{Arith,spam,spam-method} \alias{Arith,spam,ANY-method} \alias{Arith,ANY,spam-method} \alias{Compare,ANY,spam-method} \alias{Compare,spam,ANY-method} \alias{Compare,spam,spam-method} \alias{!,spam-method} \alias{+,spam,missing-method} \alias{-,spam,missing-method} \alias{c,spam-method} \alias{t,spam-method} \alias{length<-,spam-method} \alias{length,spam-method} \alias{lower.tri,spam-method} \alias{plot,spam,missing-method} \alias{plot,spam,spam-method} \alias{show,spam-method} \alias{upper.tri,spam-method} \title{Class "spam"} \description{The \code{spam} class is a representation of sparse matrices.} \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("spam", entries, colindices, rowpointes, dimension)}. The standard "old Yale sparse format" is used to store sparse matrices.\cr The matrix \code{x} is stored in row form. The first element of row \code{i} is \code{x@rowpointers[i]}. The length of row \code{i} is determined by \code{x@rowpointers[i+1]-x@rowpointers[i]}. The column indices of \code{x} are stored in the \code{x@colindices} vector. The column index for element \code{x@entries[k]} is \code{x@colindices[k]}.} \section{Slots}{ \describe{ \item{\code{entries}:}{Object of class \code{"numeric"} contains the nonzero values. } \item{\code{colindices}:}{Object of class \code{"integer"} ordered indices of the nonzero values. } \item{\code{rowpointers}:}{Object of class \code{"integer"} pointer to the beginning of each row in the arrays \code{entries} and \code{colindices}.} \item{\code{dimension}:}{Object of class \code{"integer"} specifying the dimension of the matrix.} } } \section{Methods}{ \describe{ \item{as.matrix}{\code{signature(x = "spam")}: transforming a sparse matrix into a regular matrix.} \item{as.vector}{\code{signature(x = "spam")}: transforming a sparse matrix into a vector (dependings on \code{structurebased}) see \code{\link{as.vector.spam}} for details.} \item{as.spam}{\code{signature(x = "spam")}: cleaning of a sparse matrix.} \item{[<-}{\code{signature(x = "spam", i,j, value)}: assigning a sparse matrix. The negative vectors are not implemented yet. } \item{[}{\code{signature(x = "spam", i, j)}: subsetting a sparse matrix. The negative vectors are not implemented yet. } \item{\%*\%}{\code{signature(x, y)}: matrix multiplication, all combinations of sparse with full matrices or vectors are implemented.} \item{c}{\code{signature(x = "spam")}: vectorizes the sparse matrix and takes account of the zeros. Hence the lenght of the result is \code{prod(dim(x))}.} \item{cbind}{\code{signature(x = "spam")}: binds sparse matrices, see \code{\link{cbind}} for details.} \item{chol}{\code{signature(x = "spam")}: see \code{\link{chol}} for details.} \item{diag}{\code{signature(x = "spam")}: see \code{\link{diag}} for details.} \item{dim<-}{\code{signature(x = "spam")}: rearranges the matrix to reflect a new dimension.} \item{dim}{\code{signature(x = "spam")}: gives the dimension of the sparse matrix.} \item{pad<-}{\code{signature(x = "spam")}: truncates or augments the matrix see \code{\link{dim}} for details.} \item{image}{\code{signature(x = "spam")}: see \code{\link{image}} for details.} \item{display}{\code{signature(x = "spam")}: see \code{\link{display}} for details.} % \item{initialize}{\code{signature(.Object = "spam")}: ... } \item{length<-}{\code{signature(x = "spam")}: Is not implemented and causes an error.} \item{length}{\code{signature(x = "spam")}: gives the number of non-zero elements.} \item{lower.tri}{\code{signature(x = "spam")}: see \code{\link{lower.tri}} for details. } \item{Math}{\code{signature(x = "spam")}: see \code{\link{Math}} for details.} \item{Math2}{\code{signature(x = "spam")}: see \code{\link{Math2}} for details. } \item{norm}{\code{signature(x = "spam")}: calculates the norm of a matrix.} \item{plot}{\code{signature(x = "spam", y)}: same functionality as the ordinary \code{\link{plot}}. } \item{print}{\code{signature(x = "spam")}: see \code{\link{print}} for details.} \item{rbind}{\code{signature(x = "spam")}: binds sparse matrices, see \code{\link{cbind}} for details.} % \item{show}{\code{signature(object = "spam")}: ... } \item{solve}{\code{signature(a = "spam")}: see \code{\link{solve}} for details.} \item{summary}{\code{signature(object = "spam")}: small summary statement of the sparse matrix.} \item{Summary}{\code{signature(x = "spam")}: All functions of the \code{Summary} class (like \code{min}, \code{max}, \code{range}...) operate on the vector \code{x@entries} and return the result thereof. See Examples or \code{\link{Summary}} for details. } \item{t}{\code{signature(x = "spam")}: transpose of a sparse matrix.} \item{upper.tri}{\code{signature(x = "spam")}: see \code{\link{lower.tri}} for details.} } } \section{Details}{ The compressed sparse row (CSR) format is often described with the vectors \code{a}, \code{ia}, \code{ja}. To be a bit more comprehensive, we have chosen longer slot names. } \section{Note}{The slots \code{colindices} and \code{rowpointers} are tested for proper integer assignments. This is not true for \code{entries}. } %\references{} \author{Reinhard Furrer, some of the Fortran code is based on A. George, J. Liu, E. S. Ng, B.W Peyton and Y. Saad (alphabetical)} %\note{} %\seealso{} \examples{ showMethods("as.spam") smat <- diag.spam(runif(15)) range(smat) cos(smat) } \keyword{classes} spam/man/diff.Rd0000644000176200001440000000301614165531533013172 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/diff.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{diff} \alias{diff} \alias{diff.spam} \alias{diff,spam-method} \title{Lagged Differences} \description{Returns suitably lagged and iterated differences.} \usage{ # diff.spam(x, lag = 1, differences = 1, ...) \S4method{diff}{spam}(x, lag = 1, differences = 1, ...) } \arguments{ \item{x}{a \code{spam} matrix containing the values to be differenced.} \item{lag}{an integer indicating which lag to use.} \item{differences}{an integer indicating the order of the difference.} \item{...}{further arguments to be passed to or from methods.} } \value{A \code{spam} matrix with elements similar to \code{as.spam(diff(as.matrix(x), ...))}. } %\details{ } %\references{} \seealso{\code{\link[base]{diff}} in \code{base}, \code{\link{precmat}}.} \examples{ # incidence matrix for a RW(3) model D <- diff.spam(diag.spam(10), lag=1, differences=3) t(D)\%*\%D } \author{Reinhard Furrer} \keyword{array} \keyword{manip} spam/man/dim.Rd0000644000176200001440000000312314064660063013031 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/dim.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{dim} \alias{dim.spam} \alias{dim<-.spam} \alias{dim<-,spam-method} \title{Dimensions of an Object} \description{ Retrieve or set the dimension of an \code{spam} object. } \usage{ # dim(x) # dim(x) <- value %"dim<-.spam"(x,value) } \arguments{ \item{x}{a \code{spam} matrix} \item{value}{A numeric two-vector, which is coerced to integer (by truncation).} } \value{ \code{dim} retrieves the \code{dimension} slot of the object. It is a vector of mode \code{integer}. The replacemnt method changes the dimension of the object by rearranging. } \details{ In older version of \code{spam}, the behavior of the replacement method was different and is now implemented in \code{\link{pad.spam}}. } %\references{} \seealso{\code{\link{pad.spam}}. } \examples{ x <- diag(4) dim(x)<-c(2,8) x s <- diag.spam(4) dim(s) <- c(2,8) # result is different than x s <- diag.spam(4) pad(s) <- c(7,3) # any positive value can be used } \author{Reinhard Furrer} \keyword{array} spam/man/diag.Rd0000644000176200001440000000542514064660063013173 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/diag.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{diag} \alias{diag} \alias{diag.of.spam} \alias{diag.spam} \alias{spam_diag} \alias{diag,spam-method} \alias{diag,ANY-method} \alias{diag<-} \alias{diag<-,ANY-method} \alias{diag<-,spam-method} \alias{diag<-.spam} \alias{diag.spam<-} \alias{diag.assign,spam-method} \title{Sparse Matrix diagonals} \description{Extract or replace the diagonal of a matrix, or construct a diagonal matrix. } \usage{ ## diag(x) ## diag(x=1, nrow, ncol, names = TRUE) diag(x) <- value diag.spam(x=1, nrow, ncol) spam_diag(x=1, nrow, ncol) diag.spam(x) <- value } \arguments{ \item{x}{a \code{spam} matrix, a vector or a scalar.} \item{nrow, ncol}{Optional dimensions for the result.} \item{value}{either a single value or a vector of length equal to that of the current diagonal.} } \value{ If \code{x} is a spam matrix then \code{diag(x)} returns the diagonal of \code{x}. The assignment form sets the diagonal of the sparse matrix \code{x} to the given value(s).\cr \code{diag.spam} works as \code{diag} for spam matrices: If \code{x} is a vector (or 1D array) of length two or more, then \code{diag.spam(x)} returns a diagonal matrix whose diagonal is \code{x}. \code{spam_diag} is an alias for \code{diag.spam} and in the spirit of the result of \code{diag} is a \code{spam} object. If \code{x} is a vector of length one then \code{diag.spam(x)} returns an identity matrix of order the nearest integer to \code{x}. The dimension of the returned matrix can be specified by \code{nrow} and \code{ncol} (the default is square). The assignment form sets the diagonal of the matrix \code{x} to the given value(s). } \details{Using \code{diag(x)} can have unexpected effects if \code{x} is a vector that could be of length one. Use \code{diag(x, nrow = length(x))} for consistent behaviour. } %\references{} \seealso{\code{\link{upper.tri}}, \code{\link{lower.tri}}. } \examples{ diag.spam(2, 4) # 2*I4 smat <- diag.spam(1:5) diag( smat) diag( smat) <- 5:1 # The last line is equivalent to diag.spam( smat) <- 5:1 # Note that diag.spam( 1:5) <- 5:1 not work of course. } \author{Reinhard Furrer} \keyword{array} \keyword{algebra} spam/man/s3only.Rd0000644000176200001440000000251614064660063013514 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/s3only.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{s3only} \alias{var.spam} \title{Wappers for Sparse Matrices} \description{ These functions are convenient wrappers for \code{spam} objects to classical matrix operations.} \usage{ var.spam(x, \dots) \S3method{var}{spam}(x, \dots) } \arguments{ \item{x}{matrix of class \code{spam}.} \item{\dots}{further arguments passed to or from other methods.} } \value{Depends on function\dots } \details{There is probably no point in fully defining methods here. Typically, these functions do not exploit sparsity structures. Hence, for very large matrices, warnings may be posted.} %\references{} %\note{} \seealso{Option \code{"inefficiencywarning"} in \code{\link{spam.options}}. } \author{Reinhard Furrer} \keyword{algebra} spam/man/germany.plot.Rd0000644000176200001440000000444114261751013014676 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/germany.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{germany.plot} \alias{germany.plot} \title{Plot Administrative Districts of Germany} \description{Displaying data over the administrative districts of Germany} \usage{ germany.plot(vect, col=NULL, zlim=range(vect), legend=TRUE, main=NULL, cex.axis=1, cex.main=1.5, add=FALSE, ... ) } \arguments{ \item{vect}{vector of length 544} \item{col}{color scheme to be used. By default uses \code{colorRampPalette(brewer.pal(9,"Blues"))(100)}.} \item{zlim}{the minimum and maximum values for which colors should be plotted, defaulting to the range of \code{data}.} \item{legend}{Should the legend be added, see \sQuote{Details}.} \item{main}{an overall title for the plot.} \item{cex.axis}{label size of legend.} \item{cex.main}{label size of overall plot title.} \item{add}{logical, if true adds to current plot.} \item{\dots}{additional arguments passed to \code{polygon}.} } \references{See also \url{https://de.wikipedia.org/wiki/Amtlicher_Gemeindeschl\%C3\%BCssel} and \url{https://de.wikipedia.org/wiki/Liste_der_Landkreise_in_Deutschland} %The code of \code{map.landkreis} is very similar to %\code{germany.map} from the package \pkg{INLA}.} } \details{The legend is only added, provided (a) function \code{image.plot} is available.\cr The perfect position of the legend is an art per se and depends on various \code{par} parameters. One possiblity for finer control is to not plot it and to manually call the function \code{image.plot} of \pkg{fields}.} \seealso{\code{\link{Oral}}.} \examples{ data( Oral) germany.plot( Oral$Y/Oral$E) # Plot the Bundeslaender: germany.plot(germany.info$id\%/\%1000,col=rep(2:8,3), legend=FALSE) } \author{Reinhard Furrer} \keyword{hplot} spam/man/mle.Rd0000644000176200001440000001212414261621355013036 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/mle.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{mle} \alias{neg2loglikelihood.spam} \alias{neg2loglikelihood.nomean} \alias{mle.spam} \alias{mle.nomean.spam} \alias{neg2loglikelihood} \alias{mle} \alias{mle.nomean} \title{Maximum likelihood estimates} \description{Maximum likelihood estimates of a simple spatial model} \usage{ neg2loglikelihood.spam(y, X, distmat, Covariance, beta, theta, Rstruct = NULL, cov.args = NULL, ...) neg2loglikelihood(y, X, distmat, Covariance, beta, theta, cov.args = NULL, ...) neg2loglikelihood.nomean(y, distmat, Covariance, theta, cov.args = NULL, ...) mle.spam(y, X, distmat, Covariance, beta0, theta0, thetalower, thetaupper, optim.control=NULL, Rstruct = NULL, hessian = FALSE, cov.args = NULL, ...) mle(y, X, distmat, Covariance, beta0, theta0, thetalower, thetaupper, optim.control=NULL, hessian = FALSE, cov.args = NULL, ...) mle.nomean.spam(y, distmat, Covariance, theta0, thetalower, thetaupper, optim.control=NULL, Rstruct = NULL, hessian = FALSE, cov.args = NULL, ...) mle.nomean(y, distmat, Covariance, theta0, thetalower, thetaupper, optim.control=NULL, hessian = FALSE, cov.args = NULL, ...) } \arguments{ \item{y}{data vector of length n.} \item{X}{the design matrix of dimension n x p.} \item{distmat}{a distance matrix. Usually the result of a call to \code{nearest.dist}.} \item{Covariance}{function defining the covariance. See example.} \item{beta}{parameters of the trend (fixed effects).} \item{theta}{parameters of the covariance structure.} \item{Rstruct}{the Cholesky structure of the covariance matrix.} \item{beta0,theta0}{inital values.} \item{thetalower,thetaupper}{lower and upper bounds of the parameter \code{theta}.} \item{optim.control}{arguments passed to \code{optim}.} \item{hessian}{Logical. Should a numerically differentiated Hessian matrix be returned?} \item{cov.args}{additional arguments passed to \code{Covariance}.} \item{...}{additional arguments passed to \code{chol}.} } \value{The negative-2-loglikelihood or the output from the function \code{optim}. } \details{ We provide functions to calculate the negative-2-log-likelihood and maximum likelihood estimates for the model y ~ N_n( X beta, Sigma(h;theta) ) in the case of a sparse or ordinary covariance matrices. In the case of the \code{*.spam} versions, the covariance function has to return a \code{spam} object. In the other case, the methods are correctly overloaded and work either way, slightly slower than the \code{*.spam} counterparts though. When working on the sphere, the distance matrix has to be transformed by h -> R / 2 sin(h/2) where R is the radius of the sphere. The covariance function requires that the first argument is the distance matrix and the second the parameters. One can image cases in which the covariance function does not take the entire distance matrix but only some partial information thereof. (An example is the use of a kronecker type covariance structure.) In case of a sparse covariance construction where the argument \code{Rstruct} is not given, the first parameter element needs to be the range parameter. (This results from the fact, that a sparse structure is constructed that is independent of the parameter values to exploit the fast Choleski decomposition.) In the zero-mean case, the \code{neg2loglikelihood} is calculated by setting the parameters \code{X} or \code{beta} to zero. } %\references{} \seealso{\code{\link{covmat}}, \code{\link{rmvnorm.spam}} } \examples{ # True parameter values: truebeta <- c(1,2,.2) # beta = (intercept, linear in x, linear in y) truetheta <- c(.5,2,.02) # theta = (range, sill, nugget) # We now define a grid, distance matrix, and a sample: x <- seq(0,1,l=5) locs <- expand.grid( x, x) X <- as.matrix( cbind(1,locs)) # design matrix distmat <- nearest.dist( locs, upper=NULL) # distance matrix Sigma <- cov.sph( distmat, truetheta) # true covariance matrix set.seed(15) y <- c(rmvnorm.spam(1,X \%*\% truebeta,Sigma)) # construct sample # Here is the negative 2 log likelihood: neg2loglikelihood.spam( y, X, distmat, cov.sph, truebeta, truetheta) # We pass now to the mle: res <- mle.spam(y, X, distmat, cov.sph, truebeta, truetheta,thetalower=c(0,0,0),thetaupper=c(1,Inf,Inf)) # Similar parameter estimates here, of course: mle.nomean.spam(y-X\%*\%res$par[1:3], distmat, cov.sph, truetheta, thetalower=c(0,0,0), thetaupper=c(1,Inf,Inf)) } \author{Reinhard Furrer } \keyword{algebra} spam/man/grid_trace2.Rd0000644000176200001440000000526314114176126014452 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/grid_trace2.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{grid_trace2} \alias{grid_trace2} \title{Two trace plots and a scatter plot.} \description{For two (MCMC) chains of the same length trace plots and a scatter plot are drawn. } \usage{ grid_trace2(chain1, chain2 = NULL, xlim = NULL, ylim1 = NULL, ylim2=NULL, chain1_lab = "", chain2_lab = "", main = "", chain1_yaxis_at = NULL, chain2_yaxis_at = NULL, log = FALSE, cex_points = unit(0.2, "mm"), cex_main = unit(1.2, "mm"), lwd_lines = unit(0.1, "mm"), lwd_frame = unit(0.8, "mm"), draw = TRUE) } \arguments{ \item{chain1}{Numeric vector or a matrix with two columns.} \item{chain2}{Numeric vector of same length as \code{chain1}. (Only used if \code{chain1} is specified as vector).} \item{xlim}{x axis limits of both chains (numeric vector of length 2). } \item{ylim1}{y axis limits of chain 1 (numeric vector of length 2).} \item{ylim2}{y axis limits of chain 2 (numeric vector of length 2).} \item{chain1_lab}{Label of chain 1 (character of length 1). } \item{chain2_lab}{Label of chain 2 (character of length 1). } \item{main}{Title (character of length 1). } \item{chain1_yaxis_at}{Points at which tick-marks are drawn for chain 1.} \item{chain2_yaxis_at}{Points at which tick-marks are drawn for chain 2. } \item{log}{Logical, should the date be log transformed?} \item{cex_points}{Size of points in scatter plot. } \item{cex_main}{Size of the title font. } \item{lwd_lines}{Line width of trace plots. } \item{lwd_frame}{Line width of frames. } \item{draw}{Logical, should the returned grob object be drawn?} } \value{A grob object.} \details{The figure is optimized for a plot of the format x11(width = 10, height = 3).} %\references{} \seealso{grid_zoom} \examples{ grid_trace2(runif(500), runif(500), chain1_yaxis_at = seq(.2, 1, by = .2), chain1_lab = "chain1", chain2_lab = "chain2", main = "Uniform", lwd_lines = grid::unit(.5, "mm")) } \author{Florian Gerber } \keyword{plot} \keyword{trace plot} \keyword{grid} spam/man/spam-package.Rd0000644000176200001440000000744614472375030014625 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/spam-package.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{spam-package} \alias{spam-package} \alias{SPAM} \alias{Spam} \alias{. SPAM .} \docType{package} \title{SPArse Matrix Package} \description{\code{spam} is a collection of functions for sparse matrix algebra. } \section{Gereral overview}{What is spam and what is it not:\cr While \code{Matrix} seems an overshoot of classes and \code{SparseM} focuses mainly on regression type problem, we provide a minimal set of sparse matrix functions fully functional for everyday spatial statistics life. There is however some emphasize on Markov chain Monte Carlo type calculations within the framework of (Gaussian) Markov random fields. \cr Emphasis is given on a comprehensive, simple, tutorial structure of the code. The code is S4 based but (in a tutorial spirit) the functions are in a S3 structure visible to the user (exported via \code{NAMESPACE}).\cr There exist many methods for sparse matrices that work identically as in the case of ordinary matrices. All the methods are discussed in the help and can be accessed directly via a \code{*.spam} concatenation to the function. For example, \code{help(chol.spam)} calls the help directly. We deliberately avoided aliases according to analogue helps from the base package.\cr Sparseness is used when handling large matrices. Hence, care has been used to provide efficient and fast routines. Essentially, the functions do not transform the sparse structure into full matrices to use standard (available) functionality, followed by a back transform. We agree, more operators, functions, etc. should eventually be implemented. The packages \code{fields} and \code{spam} are closely linked. \cr } \references{Reinhard Furrer, Stephan R. Sain (2010). "spam: A Sparse Matrix R Package with Emphasis on MCMC Methods for Gaussian Markov Random Fields.", \emph{Journal of Statistical Software}, 36(10), 1-25, \doi{10.18637/jss.v036.i10}.\cr Florian Gerber, Reinhard Furrer (2015). "Pitfalls in the Implementation of Bayesian Hierarchical Modeling of Areal Count Data: An Illustration Using BYM and Leroux Models.", \emph{Journal of Statistical Software}, Code Snippets, 63(1), 1-32, \doi{10.18637/jss.v063.c01}.\cr F. Gerber, K. Moesinger, R. Furrer (2017), "Extending R packages to support 64-bit compiled code: An illustration with spam64 and GIMMS NDVI3g data.", \emph{Computer & Geoscience} 104, 109-119, \doi{10.1016/j.cageo.2016.11.015}." } \seealso{See \code{\link{spam.class}} for a detailed class description, \code{\link{spam}} and \code{\link{spam.ops}} for creation, coercion and algebraic operations. \code{\link{options}}.%\cr% % %\code{demo(package='spam')} lists available demos.\cr% %Related packages are \code{\link[fields]{fields}}, % \code{\link[Matrix]{Matrix}} and % \code{SparseM.ontology}. } \examples{ ## Citations: citation('spam') citation('spam', auto=TRUE) ## History of changes \dontrun{ file.show(system.file("NEWS.md", package = "spam")) } } \author{Reinhard Furrer, with the help of Florian Gerber, Kaspar Moesinger and many others. \cr Some Fortran routines were written by Youcef Saad, Esmond G. Ng, Barry W. Peyton, Joseph W.H. Liu, Alan D. George. } \keyword{documentation} \keyword{package} spam/man/powerboost.Rd0000644000176200001440000000217714261754664014505 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/powerboost.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{powerboost} \alias{powerboost} \title{Specific Options Setting} \description{ Sets several options for speed-up. } \usage{ powerboost(flag) } \arguments{ \item{flag}{on or off} } \details{The options turn checking off (\code{"safemode"}, \code{"cholsymmetrycheck"} and \code{"cholpivotcheck"}) and switch to single precision for \code{"eps"}.} \value{ \code{NULL} in any case. } \seealso{\code{\link{spam.options}}. } \author{Reinhard Furrer, after receiving too much C.mc.st adds.} \keyword{environment} spam/man/UScounties.Rd0000644000176200001440000000335114261750774014374 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/UScounties.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{UScounties} \alias{UScounties} \alias{UScounties.storder} \alias{UScounties.ndorder} \docType{data} \title{Adjacency Structure of the Counties in the Contiguous United States} \description{ First and second order adjacency structure of the counties in the contiguous United States. We consider that two counties are neighbors if they share at least one edge of their polygon description in \code{maps}. } \format{ Two matrices of class \code{spam} \describe{ \item{UScounties.storder}{ Contains a one in the \code{i} and \code{j} element if county \code{i} is a neighbor of county \code{j}. } \item{UScounties.ndorder}{ Contains a one in the \code{i} and \code{j} element if counties \code{i} and \code{j} are a neighbors of county \code{k} and counties \code{i} and \code{j} are not neighbors. } } } %\source{\url{ www.to somethin??}} \seealso{\code{map}, from \pkg{maps}.} %\references{} \examples{ # number of counties: n <- nrow( UScounties.storder) \dontrun{ # make a precision matrix Q <- diag.spam( n) + .2 * UScounties.storder + .1 * UScounties.ndorder display( as.spam( chol( Q))) } } \keyword{datasets} spam/man/precmat.Rd0000644000176200001440000000524514165531533013723 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/precmat.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{precmat} \alias{precmat} \alias{precmat.RW1} \alias{precmat.RW2} \alias{precmat.RWn} \alias{precmat.season} \alias{precmat.IGMRFreglat} \alias{precmat.IGMRFirreglat} \title{IGMRF Precision Matrices} \description{ Fast ways to create sparse precision matrices for various IGMRF.} \usage{ precmat(n, season=12, m=n, A=NULL, order=1, ... , type="RW1") precmat.RW1(n) precmat.RW2(n) precmat.RWn(n, order=3) precmat.season(n, season=12) precmat.IGMRFreglat(n, m, order=1, anisotropy=1) precmat.IGMRFirreglat(A, eps=getOption("spam.eps")) } \arguments{ \item{n}{dimension of the field.} \item{type}{the type of the IGMRF.} \item{season}{length of season.} \item{m}{second dimension (in case of a regular lattice).} \item{A}{adjacency matrix (see below).} \item{order}{order for higher order RWs.} \item{anisotropy}{anisotropy factor, between 0 and 2.} \item{eps}{tolerance level.} \item{\dots}{arguments passed to individual functions.} } \details{\code{precmat} is a wrapper that calls the other functions according to the argument \code{type}. \cr Implements many of the precision matrices discussed in Chapter 3 of Rue and Held (2005). For example, \code{precmat.RW1}, \code{precmat.RW2} and \code{precmat.season} are given in equations (3.22), (3.40) and (3.59); \code{precmat.IGMRFreglat} on page 107. Note that for the latter we reverse the order of the dimension here! \cr If adjacency matrix is a regular matrix, it is coerced to a \code{spam} object. Only the structure is used. Make sure, that the diagonal is empty. } \value{A sparse precision matrix.} %\note{There is intentionally no \acronym{S3} distinction between the classes % \code{spam} and \code{spam.chol.}\emph{method}.} \references{Rue and Held (2005). } \seealso{\code{\link{precmat.GMRFreglat}}, \code{\link{rmvnorm.prec}}, \code{\link{adjacency.landkreis}}. } \examples{ n <- 10 Q <- precmat.RW2( n) # rmvnorm.prec(1, Q=Q) # does not work, because the matrix is singular. Q\%*\%cbind(1,1:n) } % backsolve( chol(as.matrix(V)[ord,ord]),iidsample)[iord,] % \author{Reinhard Furrer} \keyword{algebra} spam/man/rgrf.Rd0000644000176200001440000000661014261621355013224 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/rmvnorm.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{rgrf} \alias{rgrf} \alias{rgrf.spam} \title{Draw From a Gaussian Random Field} \description{ Fast and intuitive ways to draw from a Gaussian random field.} \usage{ rgrf( n, locs, nx, ny=nx, xlim=c(0,1), ylim=c(0,1), tau=0, Covariance, theta, beta=0, X, method=c('chol'), method.args=list(sparse=FALSE), eps = getOption("spam.eps"), drop=TRUE, attributes=TRUE, ...) } \arguments{ \item{n}{number of observations.} \item{locs}{locations, the result of \code{as.matrix(locs)} will be used.} \item{nx,ny}{if no locations are specified, at least one of these to specify the grid dimension.} \item{xlim,ylim}{Domain, see \sQuote{Details}.} \item{tau}{perturbation degree, see \sQuote{Details}.} \item{Covariance}{covariance function name.} \item{theta}{covariance parameter.} \item{beta}{mean or vector for regression-type mean.} \item{X}{design matrix for regression-type mean.} \item{method}{based on Choleski factorization.} \item{method.args}{list of arguments that can be passed to the corresponding approach. For \code{"chol"} it can be, e.g., \code{RStruct}, \code{chol.args}, \code{cov.args}.} \item{eps}{small value, anything smaller is considered a collocation.} \item{drop}{logical, if a single realization should be returned as a vector.} \item{attributes}{logical, if should attributes be passed back.} \item{\dots}{currently not used.} } \details{If no locations are given, the function constructs these according a regular or a regular perturbed grid. The perturbation is determined by \code{tau}, which has to be greater than zero (no perturbation) and strictly smaller than 1/2 (max perturbation). The regular grid has spacing (here for x) \code{dx=diff(xlim)/nx} and runs from \code{xlim[1]+dx/2} to \code{xlim[2]-dx/2}. The locations are at least \code{(1/nx-2*tau*dx)} separated. \cr Currently, the only method implemented is a Cholesky factorization routine, (much as in \code{\link{rmvnorm}}). The \code{rdist()} from the \code{fields} package is awefully fast. Unless one has very sparse covariance matrices, a sparse approach is not bringing a lot of improvements. The methods may use different covariance construction approaches and thus the nesting of \code{cov.args} in \code{method.args}. } \seealso{\code{\link{rgrf}}, \code{\link{chol}} and \code{\link{ordering}}. } \examples{ require(fields) # Regular grid with constant mean: nx <- 10 field <- rgrf(1, nx=nx, Covariance="cov.wend2", theta=c(.5, 1), beta=5) quilt.plot(cbind(attr(field,"locs"),z=field), nx=nx, ny=nx) points(attr(field,"locs")) # Irregluar grid: field <- rgrf(1, nx=10, tau=0.3, Covariance="cov.mat", theta=c(.2, 1, 1.5)) fields::quilt.plot(attr(field,"locs"), field) } % backsolve( chol(as.matrix(V)[ord,ord]),iidsample)[iord,] % \author{Reinhard Furrer} \keyword{algebra} spam/man/bdiag.Rd0000644000176200001440000000362414064660063013334 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/bdiag.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{bdiag} \alias{bdiag} \alias{bdiag.spam} \title{Binds Arrays Corner-to-Corner} \description{Creates a sparse block-diagonal matrix. } \usage{ bdiag.spam(...) } \arguments{ \item{...}{Arrays to be binded together} } \details{ This is a small helper function to create block diagonal sparse matrices. In the two matrix case, \code{bdiag.spam(A,B)}, this is equivalent to a complicated \code{rbind(cbind(A, null), cbind(B, t(null)))}, where \code{null} is a null matrix of appropriate dimension.\cr It is recursively defined. The arrays are coerced to sparse matrices first.\cr This function is similar to the function \code{bdiag} from the package \code{Matrix}. It is also similar to the function \code{adiag} from the package \code{magic}. However, here no padding is done and all the dimnames are stripped. } \value{ Returns a \code{spam} matrix as described above. } %\references{} \seealso{ \code{\link{diag.spam}}. } \examples{ A <- diag.spam(2, 4) # 2*I4 B <- matrix(1,3,3) AB <- bdiag.spam(A,B) # equivalent to: ABalt <- rbind(cbind( A, matrix(0,nrow(A),ncol(B))), cbind( matrix(0,nrow(B),ncol(A)), B)) norm(AB-ABalt) # Matrices do not need to be square: bdiag.spam(1,2:5,6) } \author{Reinhard Furrer} \keyword{array} \keyword{algebra} spam/man/gmult.Rd0000644000176200001440000000304314064660063013411 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/gmult.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{gmult} \alias{gmult} \title{Generalized Multiplication} \usage{ gmult(x, splits, fact) } \description{ Multiplying specific submatrices of a spam matrix with different factors. } \arguments{ \item{x}{a spam matrix.} \item{splits}{vector of how to split the matrix into submatrices. It starts with \code{1} and ends with \code{max(dim(X))+1}.} \item{fact}{matrix of factors to multiply submatrices defined by splits. Dimensions of \code{fact} must correspond to the \code{length(splits)-1}.} } \value{Spam matrix, where each specified submatrix is multiplied with a factor.} \examples{ x <- spam(1, 15, 15) print(x, minimal = FALSE) splits <- c(1,2,8,ncol(x)+1) # divide matrix into 9 submatrices fact <- array(1:9, c(3,3)) # multiply each submatrix with a different factor oF <- gmult(x, splits, fact) print(oF, minimal = FALSE) } \author{Florian Gerber, Roman Flury} \keyword{array} \keyword{algebra} spam/man/spam-operations.Rd0000644000176200001440000001355314515421646015414 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/operations.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{spam-operations} \alias{Ops.spam} \alias{spam.ops} \alias{\%*\%-methods} \alias{\%*\%,ANY,ANY-method} \alias{\%*\%,spam,spam-method} \alias{\%*\%,spam,matrix-method} \alias{\%*\%,spam,numeric-method} \alias{\%*\%,matrix,spam-method} \alias{\%*\%,numeric,spam-method} \alias{\%d*\%} \alias{\%d*\%,spam,spam-method} \alias{\%d*\%,spam,ANY-method} \alias{\%d*\%,matrix,spam-method} \alias{\%d*\%,matrix,ANY-method} \alias{\%d*\%,spam,numeric-method} \alias{\%d*\%,numeric,spam-method} \alias{\%d*\%,numeric,matrix-method} \alias{\%d*\%,numeric,numeric-method} \alias{\%d+\%} \alias{\%d+\%,spam,spam-method} \alias{\%d+\%,spam,ANY-method} \alias{\%d+\%,matrix,spam-method} \alias{\%d+\%,matrix,ANY-method} \alias{\%d+\%,spam,numeric-method} \alias{\%d+\%,numeric,matrix-method} \alias{\%d+\%,numeric,spam-method} \alias{\%d+\%,numeric,numeric-method} \alias{+,spam,spam-method} \alias{+,matrix,spam-method} \alias{+,spam,matrix-method} \alias{+,ANY,spam-method} \alias{+,spam,ANY-method} \alias{-,spam,spam-method} \alias{-,matrix,spam-method} \alias{-,spam,matrix-method} \alias{-,ANY,spam-method} \alias{-,spam,ANY-method} \alias{*,spam,spam-method} \alias{*,ANY,spam-method} \alias{*,spam,ANY-method} \alias{/,spam,spam-method} \alias{/,ANY,spam-method} \alias{/,spam,ANY-method} \alias{/,matrix,spam-method} \alias{^,spam,spam-method} \alias{^,ANY,spam-method} \alias{^,spam,ANY-method} \alias{&,spam,ANY-method} \alias{&,spam,spam-method} \alias{&,ANY,spam-method} \alias{|,spam,ANY-method} \alias{|,ANY,spam-method} \alias{|,spam,spam-method} \alias{^,spam-method} \alias{\%\%,spam-method} \alias{\%/\%,spam-method} \alias{>,spam-method} \alias{>=,spam-method} \alias{<,spam-method} \alias{<=,spam-method} \alias{==,spam-method} \alias{!=,spam-method} \alias{norm} \alias{norm.spam} \alias{norm,ANY-method} \alias{norm,spam,character-method} \alias{norm,spam,missing-method} \alias{norm,numeric,missing-method} \alias{norm,numeric,character-method} \alias{norm,matrix,missing-method} \alias{norm,matrix,character-method} %\alias{t,ANY-method} \alias{t.spam} \alias{ncol,spam-method} \alias{nrow,spam-method} \alias{dim,ANY-method} \alias{dim,spam-method} \alias{[.spam} \alias{[<-.spam} \alias{[<-,spam,missing,missing-method} \alias{[<-,spam,missing,vector-method} \alias{[<-,spam,vector,missing-method} \alias{[<-,spam,vector,vector-method} \alias{[<-,spam,matrix,missing-method} \alias{[<-,spam,matrix,matrix-method} \alias{[<-,spam,spam,missing-method} \alias{[<-,spam,ANY,ANY-method} \alias{plot.spam} \alias{subset.spam} \alias{assign.spam} \title{Basic Linear Algebra for Sparse Matrices} \description{Basic linear algebra operations for sparse matrices of class \code{spam}. } %\usage{x \%*\% y %y \%d*\% x %y \%d+\% x %x[i,] %... %} %\arguments{ %\item{x}{matrix of class \code{spam}.} %\item{y}{matrix of class \code{spam} or a dense matrix or vector.} %\item{value}{replacement values.} %\item{i,j}{vectors of elements to extract or replace.} %\item{nrow}{optional number of rows for the result.} %} \details{Linear algebra operations for matrices of class \code{spam} are designed to behave exactly as for regular matrices. In particular, matrix multiplication, transpose, addition, subtraction and various logical operations should work as with the conventional dense form of matrix storage, as does indexing, rbind, cbind, and diagonal assignment and extraction (see for example \code{\link{diag}}). Further functions with identical behavior are \code{dim} and thus \code{nrow}, \code{ncol}. The function \code{norm} calculates the (matrix-)norm of the argument. The argument \code{type} specifies the \code{l1} norm, \code{sup} or max norm (default), or the Frobenius or Hilbert-Schmidt (\code{frobenius/hs}) norm. Partial matching can be used. For example, \code{norm} is used to check for symmetry in the function \code{chol} by computing the norm of the difference between the matrix and its transpose The operator \code{\%d*\%} efficiently multiplies a diagonal matrix (in vector form) and a sparse matrix and is used for compatibility with the package fields. More specifically, this method is used in the internal functions of \code{Krig} to make the code more readable. It avoids having a branch in the source code to handle the diagonal or nondiagonal cases. Note that this operator is not symmetric: a vector in the left argument is interpreted as a diagonal matrix and a vector in the right argument is kept as a column vector. The operator \code{\%d+\%} efficiently adds a diagonal matrix (in vector form) and a sparse matrix, similarly to the operator \code{\%d+\%}. } \references{Some Fortran functions are based on \url{https://github.com/johannesgerer/jburkardt-f/blob/master/sparsekit/sparsekit.html} } \seealso{ \code{\link{spam}} for coercion and other class relations involving the sparse matrix classes. } \examples{ # create a weight matrix and scale it: \dontrun{ wij <- distmat # with distmat from a nearest.dist(..., upper=TRUE) call n <- dim(wij)[1] wij@entries <- kernel( wij@entries, h) # for some function kernel wij <- wij + t(wij) + diag.spam(n) # adjust from diag=FALSE, upper=TRUE sumwij <- wij \%*\% rep(1,n) # row scaling: # wij@entries <- wij@entries/sumwij[ wij@colindices] # col scaling: wij@entries <- wij@entries/sumwij[ rep(1:n, diff(wij@rowpointers))] } } \keyword{algebra} spam/man/rowSums.Rd0000644000176200001440000000331014261753555013745 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/rowcolstats.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{rowSums} \alias{rowSums.spam} \alias{colSums.spam} \alias{rowMeans.spam} \alias{colMeans.spam} \alias{rowSums} \alias{colSums} \alias{rowMeans} \alias{colMeans} \alias{rowSums,spam-method} \alias{colSums,spam-method} \alias{rowMeans,spam-method} \alias{colMeans,spam-method} \title{Form Row and Column Sums and Means} \description{ Form row and column sums and means for sparse \code{\linkS4class{spam}} matrices } \usage{ rowSums(x, na.rm = FALSE, dims = 1, \dots) colSums(x, na.rm = FALSE, dims = 1, \dots) rowMeans(x, na.rm = FALSE, dims = 1, \dots) colMeans(x, na.rm = FALSE, dims = 1, \dots) } \arguments{ \item{x}{a \code{\linkS4class{spam}} object} \item{na.rm}{currently ignored} \item{dims}{ignored as we have only two dimensions.} \item{\dots}{potentially further arguments from other methods.} } \details{ Depending on the flag \code{}. } \value{ Vector of appropriate length. } %\references{} \author{ Reinhard Furrer } %\note{} \seealso{ \code{\link{apply.spam}}, \code{\link{spam.options}}. } \examples{ x <- spam( rnorm(20), 5, 4) rowSums( x) c( x \%*\% rep(1,4)) } \keyword{manip} spam/man/pad.Rd0000644000176200001440000000336614261753715013043 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/pad.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{pad} \alias{pad} \alias{pad.spam} \alias{pad<-} \alias{pad<-.spam} \alias{pad<-,spam-method} \alias{pad<-,matrix-method} \title{Padding a Sparse Matrix} \description{ Resets the dimension of a \code{spam} matrix by truncation or zero padding. } \usage{ pad(x) <- value %"pad<-.spam"(x,value) } \arguments{ \item{x}{a \code{spam} matrix} \item{value}{A numeric two-vector.} } \value{ A (\code{spam}) matrix of dimension \code{value} where trunction or padding has been used. } \details{ It is important to notice the different behavior of the replacement method for ordinary arrays and \code{spam} objects (see \sQuote{Examples}). Here, the elements are not simply rearranged but an entirely new matrix is constructed. If the new column dimension is smaller than the original, the matrix is also cleaned (with \code{option("spam.eps")} as filter). } %\references{} \seealso{\code{\link{dim.spam}}. } \examples{ x <- diag(4) dim(x)<-c(2,8) x s <- diag.spam(4) pad(s) <- c(7,3) # any positive value can be used s <- diag.spam(4) pad(s) <- c(2,8) # result is different than x } \author{Reinhard Furrer} \keyword{array} spam/man/cbind.Rd0000644000176200001440000000460614261754642013354 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/xybind.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{cbind} \alias{cbind.spam} \alias{rbind.spam} \alias{cbind} \alias{rbind} \alias{cbind,spam-method} \alias{rbind,spam-method} \title{Combine Sparse Matrices by Rows or Columns} \description{Take a sequence of vector, matrix or \code{spam} object arguments and combine by \emph{c}olumns or \emph{r}ows, respectively.} \usage{ # cbind(\dots, force64 = getOption("spam.force64"), deparse.level = 0) # rbind(\dots, deparse.level = 0) } \arguments{ \item{...}{vectors, matrices or \code{spam} objects. See \sQuote{Details} and \sQuote{Value}} \item{force64}{logical vector of length 1. If \code{TRUE}, a 64-bit spam matrix is returned in any case. If \code{FALSE}, a 32-bit matrix is returned when possible. } \item{deparse.level}{for compatibility reason here. Only \code{0} is implemented.} } \value{a \code{spam} object combining the \code{\dots} arguments column-wise or row-wise. (Exception: if there are no inputs or all the inputs are \code{NULL}, the value is \code{NULL}.)} \details{\code{rbind} and \code{cbind} are not exactly symmetric in how the objects are processed. The former is essentially an concatenation of the slots due to the sparse storage format. Different types of inputs are handled differently. The latter calls a Fortran routine after the input has been coerced to \code{spam} objects. \cr Only two objects at a time are processed. If more than two are present, a loop concatenates them successively. \cr A method is defined for a \code{spam} object as first argument. } %\references{} %\seealso{\code{\link{cbind,spam-method}}.} \examples{ x <- cbind.spam(1:5,6) y <- cbind(x, 7) rbind( x, x) # for some large matrices t( cbind( t(x), t(x))) # might be slightly faster: } \author{Reinhard Furrer} \keyword{array} \keyword{manip} spam/man/triplet.Rd0000644000176200001440000000311714261754167013756 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/triplet.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{triplet} \alias{triplet} \title{Transform a "spam" Format to Triplets} \description{Returns a list containing the indices and elements of a \code{spam} object.} \usage{ triplet(x, tri=FALSE) } \arguments{ \item{x}{sparse matrix of class \code{spam} or a matrix.} \item{tri}{Boolean indicating whether to create individual row and column indices vectors.} } \value{A list with elements \item{indices}{a by two matrix containing the indices if \code{tri=FALSE}.} \item{i,j}{vectors containing the row and column indices if \code{tri=TRUE}.} \item{values}{a vector containing the matrix elements.} } \details{ The elements are row (column) first if \code{x} is a \code{spam} object (matrix).\cr } %\references{} \seealso{ \code{\link{spam.creation}} for the inverse operation and \code{foreign} for other transformations.} \examples{ x <- diag.spam(1:4) x[2,3] <- 5 triplet(x) all.equal( spam( triplet(x, tri=TRUE)), x) } \author{Reinhard Furrer} \keyword{array} spam/man/makeprec.Rd0000644000176200001440000000416614064660063014057 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/makeprec.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{makeprec} \alias{precmat.GMRFreglat} \title{Create Precision Matrices} \description{Creates precision matrices for gridded GMRF.} \usage{ precmat.GMRFreglat(n,m, par, model = "m1p1", eps = getOption("spam.eps")) } \arguments{ \item{n}{first dimension of the grid.} \item{m}{second dimension of the grid.} \item{par}{parameters used to construct the matrix.} \item{model}{see details and examples.} \item{eps}{A tolerance parameter: elements of \code{x} such that \code{abs(x) <= eps} set to zero. Defaults to \code{eps = getOption("spam.eps")}} } \value{A \code{spam} matrix of dimension \code{prod(dims)}x\code{prod(dims)}.} \details{The function should be illustrative on how to create precision matrices for gridded GMRF. Hence, no testing (positive definiteness is done). The model specification \code{"m"} determines the complexity and \code{"p"} the number of parameters. Please see the examples on the meaning of the different models. } %\references{} \seealso{\code{\link{precmat}}, \code{\link{toeplitz.spam}}, \code{\link{kronecker.spam}}} \examples{ as.matrix(precmat.GMRFreglat(4, 3, c(.4), 'm1p1')) as.matrix(precmat.GMRFreglat(4, 3, c(.4,.3), 'm1p2')) as.matrix(precmat.GMRFreglat(4, 3, c(.4,.3,.2), 'm2p3')) as.matrix(precmat.GMRFreglat(4, 3, c(.4,.3,.2,.1),'m2p4')) # up to the diagonal, the following are equivalent: cleanup( precmat.IGMRFreglat(3,4) - precmat.GMRFreglat(3,4,1, 'm1p1')) } \author{Reinhard Furrer} \keyword{array} \keyword{algebra} spam/man/Oral.Rd0000644000176200001440000000333614064660063013163 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/Oral.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{Oral} \alias{Oral} \alias{Oral.spam} \alias{oral.spam} \docType{data} \title{Oral Cavity Cancer} \description{Oral cavity cancer counts in 544 districts in Germany over 1986-1990.} \format{\code{Oral} is a dataframe with 3 columns. \describe{ \item{Y}{observed counts} \item{E}{expected counts} \item{SMR}{standardized mortality ratios}} \code{germany} is a list of 544 elements, each describing an individual polygon of the district. } \details{The expected counts depend on the number of people in the region and their age distribution.\cr The regions are ordered according the supplied polygon description and adjacency graph.\cr There is a similar dataset \code{data(Germany)} with larynx cancer cases from the package \pkg{INLA} as well, with an additional smoking covariate. } \source{The data is available from the package \pkg{INLA} distributed from \url{https://www.r-inla.org}. } \references{ Knorr-Held, L. and Rasser, G. (2000) Bayesian Detection of Clusters and Discontinuities in Disease Maps, \emph{Biometrics}, 56, 13--21. } \seealso{\code{\link{germany.plot}}.} \keyword{datasets} spam/man/methods.Rd0000644000176200001440000000216214261754050013724 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/methods.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{spam methods} \alias{methods.spam} \title{Methods for Sparse Matrices} \description{Methods without any additional parameters for sparse matrices. } \details{If a method for \code{spam} objects takes the same arguments, produces the intuitive output. We do not provide additional help pages. However, such methods are usually linked to a \code{xzy.spam} function, that could also be called directly. } \seealso{Corresponding base help functions. } \author{Reinhard Furrer} \keyword{internal} spam/man/isSymmetric.Rd0000644000176200001440000000325714261753526014606 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/isSymmetric.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{isSymmetric} \alias{isSymmetric.spam} \alias{isSymmetric,spam-method} \title{Test if a Sparse Matrix is Symmetric} \description{Efficient function to test if 'object' is symmetric or not.} \usage{ # isSymmetric.spam(object, ...) \S3method{isSymmetric}{spam}(object, tol = 100 * .Machine$double.eps, ...)} \arguments{ \item{object}{a \code{spam} matrix.} \item{tol}{numeric scalar >= 0. Smaller differences are not considered, see \code{all.equal.spam}.} \item{...}{further arguments passed to \code{all.equal.spam}.} } \details{symmetry is assessed by comparing the sparsity structure of \code{object} and \code{t(object)} via the function \code{all.equal.spam}. If a difference is detected, the matrix is cleaned with \code{cleanup} and compared again.} \value{ logical indicating if \code{object} is symmetric or not.} \seealso{\code{\link{all.equal.spam}}, \code{\link{cleanup}}.} \examples{ obj <- diag.spam(2) isSymmetric(obj) obj[1,2] <- .Machine$double.eps isSymmetric(obj) all.equal(obj, t(obj)) } \author{Reinhard Furrer} \keyword{array} spam/man/rmvt.Rd0000644000176200001440000000336214261741610013252 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/rmvnorm.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{rmvt} \alias{rmvt} \alias{rmvt.spam} \title{Draw From a Multivariate t-Distribution} \description{ Fast ways to draw from a multivariate t-distribution the scale (covariance) matrix is sparse.} \usage{ rmvt(n, Sigma, df = 1, delta = rep(0, nrow(Sigma)), type = c("shifted", "Kshirsagar"), ..., sigma) rmvt.spam(n, Sigma, df = 1, delta = rep(0, nrow(Sigma)), type = c("shifted", "Kshirsagar"), ..., sigma) } \arguments{ \item{n}{number of observations.} \item{Sigma}{scale matrix (of class \code{spam}).} \item{df}{degrees of freedom.} \item{delta}{vector of noncentrality parameters.} \item{type}{type of the noncentral multivariate t distribution.} \item{\dots}{arguments passed to \code{rmvnorm.spam}.} \item{sigma}{similar to \code{Sigma}. Here for portability with \code{mvtnorm::rmvt()}} } \details{This function is very much like \code{rmvt()} from the package \pkg{mvtnorm}. We refer to the help of the afore mentioned. } \references{See references in \code{mvtnorm::rmvt()}. } \seealso{\code{\link{rmvnorm}}. } %\examples{} % backsolve( chol(as.matrix(V)[ord,ord]),iidsample)[iord,] % \author{Reinhard Furrer} \keyword{algebra} spam/man/constructors.Rd0000644000176200001440000000262614261750620015035 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/constructors.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{constructors} \alias{rowpointers} \alias{rowpointers<-} \alias{colindices} \alias{colindices<-} \alias{entries} \alias{entries<-} \alias{dimension<-} \alias{constructors} \title{Slot Modification} \description{Modify slots of \code{spam} objects } \usage{ rowpointers( x) <- value colindices( x) <- value entries( x) <- value} \arguments{ \item{x}{a \code{spam} matrix} \item{value}{vector of appropriate length.} } \value{Modified \code{spam} object.} \details{Various tests are performed. Thus much slower than direct assignment.\cr Slot \code{dimension} should be changed through \code{pad} or \code{dim} } \examples{ x <- diag.spam( 2) rowpointers( x) <- c(1,1,3) # The last line is equivalent to x@rowpointers <- as.integer( c(1,1,3)) } \author{Reinhard Furrer} \keyword{array} spam/man/random.Rd0000644000176200001440000000505414261753736013556 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/random.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{random} \alias{spam_random} \title{Create Random Sparse Matrices} \description{Creates random spam matrix given the dimension and other parameters.} \usage{ spam_random(nrow = 1L, ncol = nrow, density = 0.5, distribution = NULL, digits = NULL, sym = FALSE, spd = FALSE, verbose = FALSE, ...) } \arguments{ \item{nrow}{integer value for the number of rows for the \code{spam} matrix to create.} \item{ncol}{integer value for the number of columns. The default value is the same as \code{nrow}.} \item{density}{A numeric value between 0 and 1 specifying the approximate density of matrix. If equal to zero the \code{spam} matrix contains only zeros and if equal to 1 the \code{spam} matrix is full.} \item{distribution}{a random number generating distribution function to sample the entries of the \code{spam} matrix. The function must have an argument with the name \code{n}, possible candidates are \code{rnorm}, \code{rexp}, \code{rpois}, \code{rweibull}, etc..} \item{...}{possible additional arguments for the distribution function if specified with \code{distribution}.} \item{digits}{an integer value for the number of digits the entries should be rounded.} \item{sym}{logical value to specify symmetry of the \code{spam} matrix.} \item{spd}{logical value to specify positive definitness of the \code{spam} matrix, via diagonal dominace criteria. Note, if \code{spd} TRUE, then \code{sym} is overwritten to \code{TRUE} in any case.} \item{verbose}{logical value to specify verbose statments of the function.} } \value{A random matrix in \code{spam} format.} \details{To create a random spam64 matrix, set \code{options(spam.force64 = TRUE)}.} %\references{} \seealso{\code{\link{spam-class}} and \code{\link{display.spam}}} \examples{ set.seed(42) rspam <- spam_random(500, digits = 2, distribution = rnorm, sd = 2, mean = 10, density = .01) display.spam(rspam, cex = 2) } \author{Florian Gerber, Roman Flury, Reinhard Furrer} spam/man/rmvnorm.Rd0000644000176200001440000000642114261621355013764 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/rmvnorm.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{rmvnorm} \alias{rmvnorm} \alias{rmvnorm.spam} \alias{rmvnorm.prec} \alias{rmvnorm.canonical} \title{Draw Multivariate Normals} \description{ Fast ways to draw multivariate normals when the variance or precision matrix is sparse.} \usage{ rmvnorm(n, mu=rep.int(0, dim(Sigma)[1]), Sigma, ..., mean, sigma) rmvnorm.spam(n, mu=rep.int(0, dim(Sigma)[1]), Sigma, Rstruct=NULL, ..., mean, sigma) rmvnorm.prec(n, mu=rep.int(0, dim(Q)[1]), Q, Rstruct=NULL, ...) rmvnorm.canonical(n, b, Q, Rstruct=NULL, ...) } \arguments{ \item{n}{number of observations.} \item{mu}{mean vector.} \item{Sigma}{covariance matrix (of class \code{spam}).} \item{Q}{precision matrix.} \item{b}{vector determining the mean.} \item{Rstruct}{the Cholesky structure of \code{Sigma} or \code{Q}.} \item{\dots}{arguments passed to \code{chol}.} \item{mean,sigma}{similar to \code{mu} and \code{Sigma}. Here for portability with \code{mvtnorm::rmvnorm()}} } \details{All functions rely on a Cholesky factorization of the covariance or precision matrix. \cr The functions \code{rmvnorm.prec} and \code{rmvnorm.canonical} do not require sparse precision matrices Depending on the the covariance matrix \code{Sigma}, \code{rmvnorm} or \code{rmvnorm.spam} is used. If wrongly specified, dispatching to the other function is done. \cr Default mean is zero. Side note: mean is added via \code{sweep()} and no gain is accieved by distinguishing this case. \cr Often (e.g., in a Gibbs sampler setting), the sparsity structure of the covariance/precision does not change. In such setting, the Cholesky factor can be passed via \code{Rstruct} in which only updates are performed (i.e., \code{update.spam.chol.NgPeyton} instead of a full \code{chol}). } \references{See references in \code{\link{chol}}. } \seealso{\code{\link{rgrf}}, \code{\link{chol}} and \code{\link{ordering}}. } \examples{ # Generate multivariate from a covariance inverse: # (usefull for GRMF) set.seed(13) n <- 25 # dimension N <- 1000 # sample size Sigmainv <- .25^abs(outer(1:n,1:n,"-")) Sigmainv <- as.spam( Sigmainv, eps=1e-4) Sigma <- solve( Sigmainv) # for verification iidsample <- array(rnorm(N*n),c(n,N)) mvsample <- backsolve( chol(Sigmainv), iidsample) norm( var(t(mvsample)) - Sigma, type="m") # compare with: mvsample <- backsolve( chol(as.matrix( Sigmainv)), iidsample, n) #### ,n as patch norm( var(t(mvsample)) - Sigma, type="m") # 'solve' step by step: b <- rnorm( n) R <- chol(Sigmainv) norm( backsolve( R, forwardsolve( R, b))- solve( Sigmainv, b) ) norm( backsolve( R, forwardsolve( R, diag(n)))- Sigma ) } % backsolve( chol(as.matrix(V)[ord,ord]),iidsample)[iord,] % \author{Reinhard Furrer} \keyword{algebra} spam/man/Math.Rd0000644000176200001440000000625414261621355013161 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/math.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{Math} \alias{Math} \alias{Math.spam} \alias{Math,spam-method} \alias{ceiling.spam} \alias{ceiling,spam-method} \alias{floor.spam} \alias{floor,spam-method} \alias{trunc.spam} \alias{trunc,spam-method} \alias{exp.spam} \alias{exp,spam-method} \alias{log.spam} \alias{log,spam-method} \alias{log2.spam} \alias{log2,spam-method} \alias{log10.spam} \alias{log10,spam-method} \alias{sqrt.spam} \alias{sqrt,spam-method} \alias{gamma.spam} \alias{gamma,spam-method} \alias{digamma.spam} \alias{digamma,spam-method} \alias{trigamma.spam} \alias{trigamma,spam-method} \alias{lgamma.spam} \alias{lgamma,spam-method} \alias{abs.spam} \alias{abs,spam-method} \alias{cumprod.spam} \alias{cumprod,spam-method} \alias{cumsum.spam} \alias{cumsum,spam-method} \alias{cummax.spam} \alias{cummax,spam-method} \alias{cummin.spam} \alias{cummin,spam-method} \alias{cos.spam} \alias{cos,spam-method} %\alias{cospi.spam} %\alias{cospi,spam-method} \alias{cosh.spam} \alias{cosh,spam-method} \alias{acos.spam} \alias{acos,spam-method} \alias{acosh.spam} \alias{acosh,spam-method} \alias{sin.spam} \alias{sin,spam-method} \alias{asin.spam} \alias{asin,spam-method} \alias{asinh.spam} \alias{asinh,spam-method} \alias{tan.spam} \alias{tan,spam-method} \alias{atan.spam} \alias{atan,spam-method} \alias{atanh.spam} \alias{atanh,spam-method} \title{Mathematical Functions} \description{Applies the \code{Math} group functions to \code{spam} objects } \usage{# ceiling(x) # floor(x) # exp(x, base = exp(1)) # log(x, base = exp(1)) # sqrt(x) # abs(x) # cumprod(x) # cumsum(x) # cos(x) # sin(x) # tan(x) # acosh(x) } \arguments{\item{x}{spam object.} \item{base}{positive number. The base with respect to which logarithms are computed. Defaults to \code{e=exp(1)}.} } \value{If the option \code{spam.structurebased=TRUE}, all functions operate on the vector \code{x@entries} and return the result thereof.\cr Conversely, if \code{structurebased=FALSE}, the result is identical to one with \code{as.matrix(x)} input and an \code{as.spam} purger. } \details{ It is important to note that the zero entries do not enter the evaluation when \code{structurebased=FALSE}. The operations are performed on the stored non-zero elements. This may lead to differences if compared with the same operation on a full matrix. } %\references{ %} \seealso{\code{\link{Summary.spam}}, \code{\link{Ops.spam}} and \code{\link{Math2.spam}} } \examples{ getGroupMembers("Math") mat <- matrix(c( 1,2,0,3,0,0,0,4,5),3) smat <- as.spam( mat) cos( mat) cos( smat) options(spam.structurebased=FALSE) cos( smat) sqrt( smat) } \author{Reinhard Furrer} \keyword{manip} spam/man/rmvnorm.cond.Rd0000644000176200001440000000536114256761013014710 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/rmvnorm.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{rmvnorm.conditional} \alias{rmvnorm.cond} \alias{rmvnorm.conditional} \alias{rmvnorm.conditional.spam} \title{Draw Conditional Multivariate Normals} \description{ Fast way to draw conditional multivariate normals when the covariance matrix is sparse.} \usage{ rmvnorm.conditional(n, y, mu = rep.int(0, dim(SigmaXX)[1]+dim(SigmaYY)[1]), SigmaXX, SigmaYY, SigmaXY, noise, RstructYY = NULL, ...) } \arguments{ \item{n}{number of observations.} \item{y}{observed vector.} \item{mu}{mean vector.} \item{SigmaXX}{covariance of X, required (of class \code{spam}).} \item{SigmaXY}{cross-covariance of X-Y, optional (of class \code{spam}).} \item{SigmaYY}{covariance of Y, required (of class \code{spam}).} \item{noise}{observational noice of Y, optional. See \sQuote{Details}. } \item{RstructYY}{the Cholesky structure of \code{SigmaYY}.} \item{\dots}{arguments passed to \code{chol}.} } \details{Quite often, we want to draw condional observations \eqn{X|y} from the model \eqn{Y=X+e}, where \eqn{X} has covariance matrix \code{SigmaXX} and \eqn{e} has white noise.\cr Covariance of \eqn{Y} can be specified by \code{SigmaYY} or \code{SigmaXX+diag(noise,)}. If \eqn{Y} and \eqn{X} do not have the same dimensions, \code{SigmaXY} needs to be specified. \cr The function also implmements a general multivariate model, where the we only observe part of the vector. The components are first \eqn{X} then \eqn{Y}. The function \code{rmvnorm.cond()} is a wrapper to \code{rmvnorm.conditional()} and included to increase similarities with other packages. } \seealso{\code{\link{rmvnorm.spam}}. } \examples{ set.seed(12) N <- 300 y <- c(5, -5, -5, 5) SigmaXX <- as.spam(.95^abs(outer(1:N, 1:N, "-")), eps=1e-4) sel <- c(10, 100, 120, 300) # where we observe y SigmaXY <- SigmaXX[, sel] SigmaYY <- SigmaXX[sel,sel] + diag.spam(.01, length(y)) # some noise x <- rmvnorm.conditional(3, y, SigmaXX=SigmaXX, SigmaXY=SigmaXY, SigmaYY=SigmaYY) # unconditional sample: ux <- rmvnorm(1, Sigma=SigmaXX) matplot(t(rbind(x, ux)), type='l', lty=1) points(sel, y, pch=19) } \author{Reinhard Furrer} \keyword{algebra} spam/man/covmat.Rd0000644000176200001440000001056714261621355013563 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/cov.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{covmat} \alias{covmat} \alias{cov.exp} \alias{cov.sph} \alias{cor.sph} \alias{cov.nug} \alias{cov.wu1} \alias{cov.wu2} \alias{cov.wu3} \alias{cov.wend1} \alias{cov.wend2} \alias{cov.mat} \alias{cov.mat12} \alias{cov.mat32} \alias{cov.mat52} \alias{cov.finnmat} \title{Covariance Functions} \description{ Evaluate a covariance function.} \usage{ covmat(h, theta, ... , type="sph") cov.exp(h, theta, ... , eps= getOption("spam.eps")) cov.sph(h, theta, ... , eps= getOption("spam.eps")) cov.nug(h, theta, ... , eps= getOption("spam.eps")) cov.wend1(h, theta, ... , eps= getOption("spam.eps")) cov.wend2(h, theta, ... , eps= getOption("spam.eps")) cov.wu1(h, theta, ... , eps= getOption("spam.eps")) cov.wu2(h, theta, ... , eps= getOption("spam.eps")) cov.wu3(h, theta, ... , eps= getOption("spam.eps")) cov.mat(h, theta, ... , eps= getOption("spam.eps")) cov.finnmat(h, theta, ... , eps= getOption("spam.eps")) cov.mat12(h, theta, ... , eps= getOption("spam.eps")) cov.mat32(h, theta, ... , eps= getOption("spam.eps")) cov.mat52(h, theta, ... , eps= getOption("spam.eps")) cor.sph(h, range, ... , eps= getOption("spam.eps")) } \arguments{ \item{h}{object containing the lags.} \item{theta}{parameter of the covariance function, see \sQuote{Details}.} \item{range}{parameter defining the compact support.} \item{type}{covariance function specification.} \item{\dots}{arguments passed from other methods.} \item{eps}{tolerance level, see \sQuote{Details}.} } \details{\code{covmat} is a wrapper that calls the other functions according to the argument \code{type}. The nomenclature is similar to \code{precmat}. \cr The parametrization is (range, [partial-sill = 1], [smoothness = 1], [nugget = 0]), where only the range needs to be specified. In case of negative parameter values, a warning is issued and the absolute value is retained. Although more cryptic, having all arguments as a single vector simplifies optimization with \code{optim}. \cr The parameters are and locations are up to precision \code{epsilon}. That means that all distances smaller than \code{eps} are considered zero; a nugget smaller than \code{eps} is ignored; a range smaller than \code{eps} represents a nugget model; etc. \cr \code{cov.finnmat()} is similar to \code{cov.mat()} but with the \code{sqrt(8*smoothness)/range} argument in the Bessel function (instead of \code{1/range}). \code{cov.mat12()} is a wrapper to \code{cov.exp()} \code{cov.mat32()}, and \code{cov.mat52()} are fast version of \code{cov.mat()} with smoothness 3/2 and 5/2, respectively (factor 10). \cr \code{cor.sph(,range)} is a fast version of \code{cov.sph(,c(range,1,0))}. \cr Currently, the functions distinguish between a sparse \code{spam} object \code{h} and any other numeric type. In the future, this might change and appropriate methods will be implemented. } \value{Covariance function evaluated on \code{h}.} %\note{There is intentionally no \acronym{S3} distinction between the classes % \code{spam} and \code{spam.chol.}\emph{method}.} \references{Any classical book about geostatistics.} \seealso{\code{\link{precmat}}.} \examples{ set.seed(123) n <- 200 locs <- cbind(runif(n),runif(n)) h <- nearest.dist(locs, delta=sqrt(2), upper = NULL) Sigma <- cov.sph(h, c(.3, 1, .1)) iidsample <- rnorm(n) cholS <- chol.spam(as.spam(Sigma)) iorder <- iord <- ordering(cholS, inv = TRUE) sample <- (iidsample \%*\% as.spam(cholS))[iorder] plot(locs, col = fields::tim.colors(n = 256)[cut(sample, n)], pch = 20) \dontrun{ h <- seq(0, to=1, length.out=100) plot( h, cov.exp(h, c(1/3,1)), type='l', ylim=c(0,1)) type <- c("sph","wendland1","wendland2","wu1","wu2","wu3") for (i in 1:6) lines( h, covmat(h, 1, type=type[i]), col=i+1) legend('topright',legend=type, col=2:7, lty=1) } } \author{Reinhard Furrer} \keyword{algebra} spam/man/apply.Rd0000644000176200001440000000654114064660063013414 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/apply.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{apply} \alias{apply.spam} \title{Apply Functions Over Sparse Matrix Margins} \description{Returns a vector or array or list of values obtained by applying a function to margins of a sparse matrix.} \usage{apply.spam(X, MARGIN=NULL, FUN, ...) } \arguments{ \item{X}{the \code{spam} matrix to be used.} \item{MARGIN}{a vector giving the subscripts which the function will be applied over. \code{1} indicates rows, \code{2} indicates columns, \code{NULL} or \code{c(1,2)} indicates rows and columns.} \item{FUN}{the function to be applied.} \item{...}{optional arguments to \code{FUN}.} } \details{This is a handy wrapper to apply a function to the (nonzero) elements of a sparse matrix. For example, it is possible to apply a covariance matrix to a distance matrix obtained by \code{nearest.dist}, see Examples.\cr A call to \code{apply} only coerces the sparse matrix to a regular one.\cr The basic principle is applying the function to \code{@entries}, or to the extracted columns or rows (\code{[,i,drop=F]} or \code{[i,,drop=F]}). It is important to note that an empty column contains at least one zero value and may lead to non intuitive results.\cr This function may evolve over the next few releases. } \value{Similar as a call to \code{apply} with a regular matrix. The most important cases are as follows. The result is a vector (\code{MARGIN} is length 1 and \code{FUN} is scalar) or a matrix (\code{MARGIN} is length 1 and \code{FUN} returns fixed length vectors, or \code{MARGIN} is length 2 and \code{FUN} is scalar) or a list (if \code{FUN} returns vectors of different lengths).} %\references{} \seealso{\code{base:apply} for more details on Value.} \examples{ S <- as.spam(dist(1:5)) S <- apply.spam(S/2, NULL, exp) # instead of # S@entries <- exp( S@entries/2) # Technical detail, a null matrix consists # of one zero element. apply.spam(S,c(1,2),pmax) apply.spam(S,1,range) # A similar example as for the base apply. # However, no dimnames else we would get warnings. x <- as.spam(cbind(x1 = 3, x2 = c(0,0,0, 5:2))) apply.spam(x, 2, mean, trim = .2) col.sums <- apply.spam(x, 2, sum) row.sums <- apply.spam(x, 1, sum) rbind(cbind(x, row.sums), c(col.sums, sum(col.sums))) apply.spam(x, 2, is.vector) # Sort the columns of a matrix # Notice that the result is a list due to the different # lengths induced by the nonzero elements apply.spam(x, 2, sort) # Function with extra args: cave <- function(x, c1, c2) c(mean(x[c1]), mean(x[c2])) apply(x,1, cave, c1=1, c2=c(1,2)) ma <- spam(c(1:4, 0, 0,0, 6), nrow = 2) ma apply.spam(ma, 1, table) #--> a list of length 2 apply.spam(ma, 1, stats::quantile)# 5 x n matrix with rownames } \author{Reinhard Furrer} \keyword{array} \keyword{algebra} spam/man/figures/0000755000176200001440000000000014064660063013436 5ustar liggesusersspam/man/figures/germanyadjacency.png0000644000176200001440000001465714064660063017465 0ustar liggesusersPNG  IHDRJ NmPLTE  !!!"""###$$$%%%&&&'''(((***,,,---///000111222333555777888999:::;;;<<<===>>>???@@@AAACCCDDDFFFHHHJJJLLLOOOQQQRRRSSSTTTVVVWWWXXXYYYZZZ[[[\\\]]]aaabbb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i[}^/նyf`F$/lX\o\~~zG643"8ɚ5{ >E/ߕqΖ/]+n~{xk"CR#Ι{rﶯ=]~ޤ~s f?!o=]~"xq9`@0s 9f3́`@0s 9f3́`@0svQIENDB`spam/man/circulant.Rd0000644000176200001440000000301014064660063014237 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/circulant.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{circulant} \alias{circulant.spam} \title{Create Circulant Matrices} \description{Creates a circulant matrix in \code{spam} format.} \usage{ circulant.spam(x, n = NULL, eps = getOption("spam.eps")) } \arguments{ \item{x}{the first row to form the circulant matrix or a list containing the indices and the nonzero values.} \item{n}{if \code{x} is a list, the dimension of the matrix.} \item{eps}{A tolerance parameter: elements of \code{x} such that \code{abs(x) <= eps} set to zero. Defaults to \code{eps = getOption("spam.eps")}} } \value{The circulant matrix in \code{spam} format.} %\details{The vector \code{y} has to be of the same length as \code{x} % and its first element is discarded. % } %\references{} \seealso{\code{circulant} from package \pkg{magic}, \code{\link{toeplitz.spam}}} \examples{ circulant.spam(c(1,.25,0,0,0)) } \author{Reinhard Furrer} \keyword{array} \keyword{algebra} spam/man/validate_spam.Rd0000644000176200001440000000175014261754727015107 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/validate_spam.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{validate_spam} \alias{validate_spam} \title{Validate a Sparse Matrix} \description{Checks if the sparse matrix has the correct structure.} \usage{ validate_spam(object) } \arguments{ \item{object}{a spam matrix.} } \value{Returns \code{TRUE} if \code{object} is a valid spam objects. } \seealso{\code{\link{spam.creation}}} \examples{ validate_spam(spam(1, 20)) } spam/man/spam.Rd0000644000176200001440000001063114266327142013224 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/spam.creation.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{spam} \alias{spam.creation} \alias{initialize,spam-method} \alias{spam} \alias{spam.list} \alias{spam.numeric} \alias{spam,list-method} \alias{spam,numeric-method} %\alias{spam.spam} %\alias{spam,spam-method} \alias{as.spam,matrix-method} \alias{as.spam,numeric-method} \alias{as.spam,spam-method} \alias{as.spam,dist-method} \alias{as.spam,list-method} \alias{as.spam} \alias{as.spam.spam} \alias{as.spam.numeric} \alias{as.spam.matrix} \alias{as.spam.chol.NgPeyton} \alias{as.spam.dist} \alias{as.spam.list} \alias{is.spam} \title{Sparse Matrix Class} \description{ This group of functions evaluates and coerces changes in class structure. } \usage{ spam(x, nrow = 1, ncol = 1, eps = getOption("spam.eps")) % force64 = getOption("spam.force64")) as.spam(x, eps = getOption("spam.eps")) %, force64 = getOption("spam.force64")) is.spam(x) } \value{ A valid \code{spam} object.\cr \code{is.spam} returns \code{TRUE} if \code{x} is a \code{spam} object.} \arguments{ \item{x}{is a matrix (of either dense or sparse form), a list, vector object or a distance object} \item{nrow}{number of rows of matrix } \item{ncol}{number of columns of matrix } %\item{force64}{logical vector of length 1. If \code{TRUE}, a 64-bit % spam matrix is returned in any case. If \code{FALSE}, a 32-bit % matrix is returned when possible. } \item{eps}{A tolerance parameter: elements of \code{x} such that \code{abs(x) < eps} set to zero. Defaults to \code{eps = getOption("spam.eps")} } } \details{ The functions \code{spam} and \code{as.spam} act like \code{matrix} and \code{as.matrix} to coerce an object to a sparse matrix object of class \code{spam}. If \code{x} is a list, it should contain either two or three elements. In case of the former, the list should contain a \code{n} by two matrix of indicies (called \code{ind}) and the values. In case of the latter, the list should contain three vectors containing the row, column indices (called \code{i} and \code{j}) and the values. In both cases partial matching is done. In case there are several triplets with the same \code{i}, \code{j}, the values are added. \code{eps} should be at least as large as \code{.Machine$double.eps}. If \code{getOption("spam.force64")} is \code{TRUE}, a 64-bit spam matrix is returned in any case. If \code{FALSE}, a 32-bit matrix is returned when possible. } \note{The zero matrix has the element zero stored in (1,1).\cr The functions do not test the presence of \code{NA/NaN/Inf}. Virtually all call a Fortran routine with the \code{NAOK=NAOK} argument, which defaults to \code{FALSE} resulting in an error. Hence, the \code{NaN} do not always properly propagate through (i.e. \code{spam} is not IEEE-754 compliant). } \references{Reinhard Furrer, Stephan R. Sain (2010). "spam: A Sparse Matrix R Package with Emphasis on MCMC Methods for Gaussian Markov Random Fields.", \emph{Journal of Statistical Software}, 36(10), 1-25, \doi{10.18637/jss.v036.i10}. } \seealso{ \code{\link{SPAM}} for a general overview of the package; \code{\link{spam_random}} to create matrices with a random sparsity pattern; \code{\link{cleanup}} to purge a sparse matrix; \code{\link{spam.options}} for details about the \code{safemode} flag; \code{\link{read.MM}} and \code{\link{foreign}} to create \code{spam} matrices from MatrixMarket files and from certain \pkg{Matrix} or \pkg{SparseM} formats. } \examples{ # old message, do not loop, when you create a large sparse matrix set.seed(13) nz <- 128 ln <- nz^2 smat <- spam(0,ln,ln) is <- sample(ln,nz) js <- sample(ln,nz) ## IGNORE_RDIFF_BEGIN system.time(for (i in 1:nz) smat[is[i], js[i]] <- i) system.time(smat[cbind(is,js)] <- 1:nz) ## IGNORE_RDIFF_END getClass("spam") options(spam.NAOK=TRUE) as.spam(c(1, NA)) } \author{Reinhard Furrer} \keyword{algebra} spam/man/spam.chol.NgPeyton-class.Rd0000644000176200001440000001151514064660063017015 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/spam.chol.NgPeyton-class.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{spam.chol.NgPeyton-class} \docType{class} \alias{spam.chol.NgPeyton-class} \alias{as.matrix,spam.chol.NgPeyton-method} \alias{as.spam,spam.chol.NgPeyton-method} \alias{backsolve,spam.chol.NgPeyton-method} \alias{c,spam.chol.NgPeyton-method} \alias{determinant,spam.chol.NgPeyton-method} \alias{diag,spam.chol.NgPeyton-method} \alias{diag<-,spam.chol.NgPeyton-method} \alias{dim<-,spam.chol.NgPeyton-method} \alias{dim,spam.chol.NgPeyton-method} \alias{display,spam.chol.NgPeyton-method} \alias{forwardsolve,spam.chol.NgPeyton-method} \alias{image,spam.chol.NgPeyton-method} \alias{length<-,spam.chol.NgPeyton-method} \alias{length,spam.chol.NgPeyton-method} \alias{ordering,spam.chol.NgPeyton-method} \alias{print,spam.chol.NgPeyton-method} \alias{show,spam.chol.NgPeyton-method} \alias{summary,spam.chol.NgPeyton-method} \alias{t,spam.chol.NgPeyton-method} \alias{chol,spam.chol.NgPeyton-method} \title{Class "spam.chol.NgPeyton"} \description{Result of a Cholesky decomposition with the \code{NgPeyton} method} \section{Objects from the Class}{ Objects are created by calls of the form \code{chol(x,method="NgPeyton", ...)} and should not be created directly with a \code{new("spam.chol.NgPeyton", ...)} call.\cr At present, no proper print method is defined. However, the factor can be transformed into a \code{spam} object. } \section{Methods}{ \describe{ \item{as.matrix}{\code{signature(x = "spam.chol.NgPeyton")}: Transform the factor into a regular matrix. } \item{as.spam}{\code{signature(x = "spam.chol.NgPeyton")}: Transform the factor into a \code{spam} object.} \item{backsolve}{\code{signature(r = "spam.chol.NgPeyton")}: solving a triangular system, see \code{\link{solve}}. } \item{forwardsolve}{\code{signature(l = "spam.chol.NgPeyton")}: solving a triangular system, see \code{\link{solve}}. } \item{c}{\code{signature(x = "spam.chol.NgPeyton")}: Coerce the factor into a vector. } \item{determinant}{\code{signature(x = "spam.chol.NgPeyton")}: Calculates the determinant from the factor, see also \code{\link{det}}. } \item{diag}{\code{signature(x = "spam.chol.NgPeyton")}: Extracts the diagonal entries.} % \item{dim<-}{\code{signature(x = "spam.chol.NgPeyton")}: ... } \item{dim}{\code{signature(x = "spam.chol.NgPeyton")}: Retrieve the dimension. Note that \code{"dim<-"} is not implemented.} \item{display}{\code{signature(x = "spam.chol.NgPeyton")}: Transformation to a \code{spam} object and display, see also \code{\link{display}}. } \item{image}{\code{signature(x = "spam.chol.NgPeyton")}: Transformation to a \code{spam} object and display, see also \code{\link{image}}. } % \item{length<-}{\code{signature(x = "spam.chol.NgPeyton")}: ... } \item{length}{\code{signature(x = "spam.chol.NgPeyton")}: Retrieve the dimension. Note that \code{"length<-"} is not implemented. } \item{ordering}{\code{signature(x = "spam.chol.NgPeyton")}: Retrieves the ordering, in \code{\link{ordering}}. } \item{print}{\code{signature(x = "spam.chol.NgPeyton")}: Short description. } \item{show}{\code{signature(object = "spam.chol.NgPeyton")}: Short description. } \item{summary}{\code{signature(object = "spam.chol.NgPeyton")}: Description of the factor, returns (as a list) \code{nnzR}, \code{nnzcolindices}, the density of the factor \code{density}, and fill-in ratio \code{fillin}. For the use of the first two, see \sQuote{Examples} in \code{\link{chol}}.} \item{t}{\code{signature(x = "spam.chol.NgPeyton")}: Transformation to a \code{spam} object and transposition. } \item{chol}{\code{signature(x = "spam.chol.NgPeyton")}: Returns \code{x} unchanged. } } } \details{ It is not possible to directly change the length, dimension and the diagonal entries of a \code{"spam.chol.NgPeyton"} object. } \references{Ng, E. G. and B. W. Peyton (1993), "Block sparse Cholesky algorithms on advanced uniprocessor computers", \emph{SIAM J. Sci. Comput.}, \bold{14}, pp. 1034-1056. } \author{Reinhard Furrer} \seealso{\code{\link{print.spam}} \code{\link{ordering}} and \code{\link{chol}}} \examples{ x <- spam( c(4,3,0,3,5,1,0,1,4),3) cf <- chol( x) cf as.spam( cf) # Modify at own risk... slotNames(cf) } \keyword{classes} spam/man/bandwidth.Rd0000644000176200001440000000237314064660063014232 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/bandwidth.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{bandwidth} \alias{bandwidth} \title{Bandwidth of a Sparse Matrix} \description{Returns the lower and upper bandwidth of a sparse matrix} \usage{ bandwidth(A) } \arguments{ \item{A}{spam object} } \details{The matrix does not need to be diagonal. Values can be negative indicating the the matrix contains a band cinfined in the upper or lower triangular part. } \value{Integer vector containing the lower and upper bandwidth} %\references{} \seealso{ \code{\link{diag.spam}}. } \examples{ bandwidth(spam(c(0, 1), 3, 2)) bandwidth(spam(c(0, 0, 1, rep(0, 9)), 4, 3)) } \author{Reinhard Furrer} \keyword{array} \keyword{algebra} spam/man/toeplitz.Rd0000644000176200001440000000271414064660063014137 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/toeplitz.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{toeplitz} \alias{toeplitz.spam} \title{Create Toeplitz Matrices} \description{Creates symmetric and asymmetric Toeplitz matrices.} \usage{ toeplitz.spam(x, y = NULL, eps = getOption("spam.eps")) } \arguments{ \item{x}{the first row to form the Toeplitz matrix.} \item{y}{for asymmetric Toeplitz matrices, this contains the first column.} \item{eps}{A tolerance parameter: elements of \code{x} such that \code{abs(x) <= eps} set to zero. Defaults to \code{eps = getOption("spam.eps")}.} } \value{The Toeplitz matrix in \code{spam} format.} \details{The vector \code{y} has to be of the same length as \code{x} and its first element is discarded. } %\references{} \seealso{\code{\link{toeplitz}}, \code{\link{circulant.spam}}} \examples{ toeplitz.spam(c(1,.25,0,0,0)) } \author{Reinhard Furrer} \keyword{array} \keyword{algebra} spam/man/nearestdist.Rd0000644000176200001440000001211714513524642014611 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/nearestdist.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{nearestdist} \alias{dist.spam} \alias{nearest.dist} \alias{distance} \title{Distance Matrix Computation} \description{This function computes and returns specific elements of distance matrix computed by using the specified distance measure.} \usage{ nearest.dist( x, y=NULL, method = "euclidean", delta = 1, upper = if (is.null(y)) FALSE else NULL, p = 2, miles = TRUE, R = NULL, fortran = FALSE) } \arguments{ \item{x}{Matrix of first set of locations where each row gives the coordinates of a particular point. See also \sQuote{Details}.} \item{y}{Matrix of second set of locations where each row gives the coordinates of a particular point. If this is missing \code{x} is used. See also \sQuote{Details}.} \item{method}{the distance measure to be used. This must be one of \code{"euclidean"}, \code{"maximum"}, \code{"minkowski"} or \code{"greatcircle"}. Any unambiguous substring can be given.} \item{delta}{only distances smaller than \code{delta} are recorded, see Details.} \item{upper}{Should the entire matrix (\code{NULL}) or only the upper-triagonal (\code{TRUE}) or lower-triagonal (\code{FALSE}) values be calculated.} \item{p}{The power of the Minkowski distance.} \item{miles}{For great circle distance: If true distances are in statute miles if false distances in kilometers.} \item{R}{For great circle distance: Radius to use for sphere to find spherical distances. If \code{NULL} the radius is either in miles or kilometers depending on the values of the miles argument. If \code{R=1} then distances are of course in radians.} \item{fortran}{Should the C++ (\code{FALSE}) or the Fortran code (\code{TRUE}) be used. If 64-bit matrices are needed, the argument is set to (\code{TRUE}).} % \item{eps}{deprecated. Left for backwards consistency.} % \item{diag}{deprecated. Left for backwards consistency. See \sQuote{Details}.}a } \value{A \code{spam} object containing the distances spanned between zero and \code{delta}. The sparse matrix may contain many zeros (e.g., collocated data). However, to calculate covariances, these zeros are essential.} \details{For great circle distance, the matrices \code{x} and \code{y} contain the degrees longitudes in the first and the degrees latitudes in the second column. \code{delta} is in degrees. Hence to restrict to distances smaller than \code{delta.km}, one has to specify \code{delta=delta.km*360/(6378.388*2*pi)}. The distances are calculated based on spherical law of cosines. Care is needed for `zero' distances due to the final acosin: \code{acos(1-1e-16)}, especially with an actual radius. % The distance is % in single precision (I am still not sure where I lose the double precision in % the Fortran code) and if calculating the entire matrix % \code{upper=NULL} (instead of adding its transpose) it may not % pass the symmetry checks, for example.\cr Default value of Earth's radius is 3963.34miles (6378.388km).\cr There are many other packages providing distance functions. Especially for great circle distances there are considerable differences between the implementations. For high precision results, \code{sp::spDists} is a good candidate and distances of large amount of locations can be processed in parallel with the \code{parallelDist} package.\cr The formerly depreciated arguments \code{eps} and \code{diag} are now eliminated. \code{x} and \code{y} can be any object with an existing \code{as.matrix} method.\cr % A quick scan revealed distance functions in at least 7 packages % (around 2008). The argument names should be as general as possible and % be coherent with many (but not all) available distance functions.\cr The Fortran code is based on a idea of Doug Nychka. } %\references{} \seealso{\code{\link{spam_rdist}}} \examples{ # Note that upper=T and using t(X)+X is quicker than upper=NULL; # upper=T marginally slower than upper=F. # To compare nearest.dist with dist, use as.dist(...) nx <- 4 x <- expand.grid(as.double(1:nx),as.double(1:nx)) sum( ( as.dist(nearest.dist( x, delta=nx*2))- dist(x) )^2) # Create nearest neighbor structures: par(mfcol=c(1,2)) x <- expand.grid(1:nx,1:(2*nx)) display( nearest.dist( x, delta=1)) x <- expand.grid(1:(2*nx),1:nx) display( nearest.dist( x, delta=1)) } \author{Annina Cincera (C++ code), Reinhard Furrer} \keyword{array} \keyword{algebra} spam/man/det.Rd0000644000176200001440000000555714261750660013053 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/det.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{det} \alias{det,spam-method} \alias{det,spam.chol.NgPeyton-method} \alias{det.spam} \alias{det} \alias{determinant} %\alias{determinant,spam.chol.NgPeyton-method} \alias{determinant,spam-method} \alias{determinant.spam} \alias{determinant.spam.chol} \alias{determinant.spam.chol.NgPeyton} \title{Determinant of a Symmetric Positive Definite Sparse Matrix} \description{\code{det} and \code{determinant} calculate the determinant of a symmetric, positive definite sparse matrix. \code{determinant} returns separately the modulus of the determinant, optionally on the logarithm scale, and the sign of the determinant. } \usage{ det(x, ...) determinant(x, logarithm = TRUE, ...) } \arguments{ \item{x}{sparse matrix of class \code{spam} or a Cholesky factor of class \code{spam.chol.NgPeyton}.} \item{logarithm}{logical; if \code{TRUE} (default) return the logarithm of the modulus of the determinant.} \item{...}{Optional arguments. Examples include \code{method} argument and additional parameters used by the method.} } \value{For \code{det}, the determinant of \code{x}. For \code{determinant}, a list with components \item{modulus}{a numeric value. The modulus (absolute value) of the determinant if \code{logarithm} is \code{FALSE}; otherwise the logarithm of the modulus.} \item{sign}{+1, as only symmetric positive definite matrices are considered.} } \details{If the matrix is not positive definite, the function issues a warning and returns \code{NA}. The determinant is based on the product of the diagonal entries of a Cholesky factor, i.e. internally, a Cholesky decomposition is performed. By default, the NgPeyton algorithm with minimal degree ordering us used. To change the methods or supply additonal parameters to the Cholesky factorization function, it is possible to pass via \code{\link{chol}}. The determinant of a Cholesky factor is also defined. } \references{ Ng, E. G. and B. W. Peyton (1993) Block sparse Cholesky algorithms on advanced uniprocessor computers, \emph{SIAM J. Sci. Comput.}, \bold{14}, 1034--1056. } \seealso{\code{\link{chol.spam}} } \examples{ x <- spam( c(4,3,0,3,5,1,0,1,4), 3) det( x) determinant( x) det( chol( x)) } \author{Reinhard Furrer} \keyword{array} \keyword{algebra} spam/man/lower.tri.Rd0000644000176200001440000000312714064660063014211 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/lu.tri.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{lower.tri} \alias{lower.tri} \alias{upper.tri} \alias{lower.tri.spam} \alias{upper.tri.spam} \title{Lower and Upper Triangular Part of a Sparse Matrix} \description{Returns the lower or upper triangular structure or entries of a sparse matrix. } \usage{ lower.tri(x, diag = FALSE) upper.tri(x, diag = FALSE) } \arguments{ \item{x}{a sparse matrix of class \code{spam}} \item{diag}{logical. Should the diagonal be included?} } \details{Often not only the structure of the matrix is required but the entries as well. For compatibility, the default is only a structure consisting of ones (representing \code{TRUE}s). Setting the flag \code{getOption( "spam.trivalues")} to \code{TRUE}, the function returns the actual values. } \seealso{\code{\link{spam.options}} and \code{\link{diag}}} \examples{ smat <- spam( c( 1,2,0,3,0,0,0,4,5),3) upper.tri( smat) upper.tri( smat, diag=TRUE) options(spam.trivalues=TRUE) upper.tri( smat) } \keyword{array} \keyword{algebra} spam/man/spam-internal.Rd0000644000176200001440000000177314064660063015043 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/spam.internal.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{spam internal} \alias{printSize} \title{ Spam internal and auxiliary functions } \description{ The functions listed below are auxiliary functions and are not exported by the NAMESPACE. The user should not require to call these directly. } \details{\code{printSize(x, size=8, digits=2L)} constructs a string for pretty printing the object size \code{x}. \cr } \keyword{internal} spam/man/adjacency.Rd0000644000176200001440000000315014261750715014204 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/adjacency.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{adjacency} \alias{adjacency} \alias{adjacency.spam} \alias{adjacency.landkreis} \alias{germany.graph} \title{Administrative Districts of Germany} \description{Constructing the adjacency graph of the administrative districts of Germany} \usage{ adjacency.landkreis(loc) } \arguments{ \item{loc}{location of the graph structure, can be an URL.} } \details{The function is included as an example on how to construct adjacency matrices form a (common) adjacency structure. For the particular example, note that the nodes are not numbered consecutively and that they start from zero.} \value{a sparse matrix in \code{spam} format.} \references{The adjacency data has been provided by Havard Rue and is also available in \pkg{INLA}.} \seealso{\code{\link{germany.plot}} super-seeding \code{map.landkreis} for plotting.\cr \code{\link{Oral}}.} \examples{ \dontrun{ loc <- system.file("demodata/germany.adjacency", package="spam") display( adjacency.landkreis( loc)) } } \author{Reinhard Furrer} \keyword{hplot} spam/man/version.Rd0000644000176200001440000000342714064660063013754 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/version.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{version} \alias{version} \alias{spam.version} \alias{spam.Version} \title{Spam Version Information} \description{ \code{spam.version} is a variable (\code{list}) holding detailed information about the version of \code{spam} loaded. \code{spam.Version()} provides detailed information about the version of \code{spam} running. } \usage{ spam.version } \value{\code{spam.version} is a list with character-string components \item{status}{the status of the version (e.g., \code{"beta"})} \item{major}{the major version number} \item{minor}{the minor version number} \item{year}{the year the version was released} \item{month}{the month the version was released} \item{day}{the day the version was released} \item{version.string}{a \code{character} string concatenating the info above, useful for plotting, etc.} \code{spam.version} is a list of class \code{"simple.list"} which has a \code{print} method. } % \references{} \seealso{See the R counterparts \code{\link[base]{R.version}}. } \author{Reinhard Furrer} \examples{ spam.version$version.string } \keyword{environment} \keyword{sysdata} \keyword{programming} spam/man/foreign.Rd0000644000176200001440000000522614261754305013721 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/foreign.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{foreign} \alias{foreign} \alias{as.spam.matrix.csr} %\alias{as.matrix.csr.spam} \alias{as.dgRMatrix.spam} \alias{as.dgCMatrix.spam} \alias{as.spam.dgRMatrix} \alias{as.spam.dgCMatrix} \title{Transformation to Other Sparse Formats} \description{Transform between the \code{spam} sparse format to the \code{matrix.csr} format of \code{SparseM} and \code{dgRMatrix} format of \code{Matrix}} \usage{ as.spam.matrix.csr(x) as.dgRMatrix.spam(x) as.dgCMatrix.spam(x) as.spam.dgRMatrix(x) as.spam.dgCMatrix(x) } \arguments{ \item{x}{sparse matrix of class \code{spam}, \code{matrix.csr}, \code{dgRMatrix} or \code{dgCMatrix}.} } \value{According to the call, a sparse matrix of class \code{spam}, \code{matrix.csr}, \code{dgRMatrix} or \code{dgCMatrix}.} \details{ We do not provide any \code{S4} methods and because of the existing mechanism a standard \code{S3} does not work.\cr The functions are based on \code{require}.\cr Notice that \code{as.matrix.csr.spam} should read as \code{as."matrix.csr".spam}. } %\references{} \seealso{\code{\link{triplet}}, \code{\link[Matrix]{Matrix}} or \code{matrix.csr} from package \pkg{SparseM}.} \examples{ \dontrun{ S <- diag.spam(4) R <- as.dgRMatrix.spam( S) C <- as.dgCMatrix.spam( S) as.spam.dgCMatrix(C) slotNames(C) slotNames(R) # For column oriented sparse formats a transpose does not the job, # as the slot names change. # as.spam(R) does not work. } \dontrun{ # for transformations between SparseM and spam: as.matrix.csr.spam <- function(x,...) { if (new("matrix.csr")) { newx <- new("matrix.csr") slot(newx,"ra",check=FALSE) <- x@entries slot(newx,"ja",check=FALSE) <- x@colindices slot(newx,"ia",check=FALSE) <- x@rowpointers slot(newx,"dimension",check=FALSE) <- x@dimension return(newx) } stop("function requires 'SparseM' package") } # then with `SparseM`: as.matrix.csr.spam( spamobject ) } \dontrun{ # a dataset contained in Matrix data(KNex, package='Matrix') summary( KN <- as.spam.dgCMatrix(KNex$mm) ) } } \author{Reinhard Furrer} \keyword{array} \keyword{manip} spam/man/fields-wrapper.Rd0000644000176200001440000000513714064660063015213 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/rdist.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{fields-wrapper} \alias{spam_rdist} \alias{rdist.dist} \alias{spam_rdist.earth} \title{Wrapper for Distance Matrix Computation} \description{These functions are simple wrappers to \code{nearest.dist} to be used in \code{fields}.} \usage{ spam_rdist( x1, x2, delta = 1) spam_rdist.earth( x1, x2, delta = 1, miles=TRUE, R=NULL) } \arguments{ \item{x1}{Matrix of first set of locations where each row gives the coordinates of a particular point. } \item{x2}{Matrix of second set of locations where each row gives the coordinates of a particular point.} \item{delta}{only distances smaller than \code{delta} are recorded, see Details.} \item{miles}{For great circle distance: If true distances are in statute miles if false distances in kilometers.} \item{R}{Radius to use for sphere to find spherical distances. If \code{NULL} the radius is either in miles or kilometers depending on the values of the miles argument. If \code{R=1} then distances are of course in radians.} } \value{A \code{spam} object containing the distances spanned between zero and \code{delta}. The sparse matrix may contain many zeros (e.g., collocated data). However, to calculate covariances, these zeros are essential.} \details{These functions are wrappers to \code{rdist} and \code{rdist.earth} in \code{fields}. They are used to simplify the use of sparse matrices in functions like \code{mKrig}. \cr For great circle distance, the matrices \code{x1} and \code{x2} contain the degrees longitudes in the first and the degrees latitudes in the second column. \code{delta} is in degrees. Hence to restrict to distances smaller than \code{delta.km}, one has to specify \code{delta=delta.km*360/(6378.388*2*pi)}. } %\references{} \seealso{\code{\link{nearest.dist}}} \examples{ \dontrun{ require(fields) look <- mKrig(x,Y, Covariance="Wendland", dimension=2, k=1, cov.args=list( Distance='spam_rdist')) } } \author{Reinhard Furrer} \keyword{array} spam/man/eigen.Rd0000644000176200001440000001370314266327142013356 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/eigen.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{eigen} \alias{eigen.spam} \alias{eigen_approx} \title{Eigenvalues for Sparse Matrices} \description{ Functions to calculate eigenvalues and eigenvectors of \code{sparse} matrices. It uses the value of \code{spam.options("inefficiencywarning")} to dispatch between \code{base::eigen()} or the Implicitly Restarted Arnoldi Process, using 'ARPACK'. \code{eigen.spam} is a wrapper function of \code{eigen_approx} and transforms its output to \code{base::eigen} like. } \note{ The user is advised to choose the \code{control} options carefully, see \sQuote{Details} for more information. } \usage{ eigen.spam(x, nev = 10, symmetric, only.values = FALSE, control = list()) eigen_approx(x, nev, ncv, nitr, mode, only.values = FALSE, verbose = FALSE, f_routine) } \arguments{ \item{x}{a matrix of class \code{spam} whose \code{nev} eigenvalues and eigenvectors are to be computed.} \item{nev}{number of eigenvalues to calculate.} \item{symmetric}{if TRUE, the matrix is assumed to be symmetric.} \item{only.values}{if TRUE, only \code{nev} eigenvalues are computed and returned, otherwise \code{nev} eigenvalues and eigenvectors are returned.} \item{control}{additional options, see \sQuote{Details}.} \item{ncv}{see \sQuote{Details}, use the \code{control} option for \code{eigen.spam}.} \item{nitr}{see \sQuote{Details}, use the \code{control} option for \code{eigen.spam}.} \item{mode}{see \sQuote{Details}, use the \code{control} option for \code{eigen.spam}.} \item{verbose}{see \sQuote{Details}, use the \code{control} option for \code{eigen.spam}.} \item{f_routine}{only for \code{eigen_approx}, to call the Fortran routine for symmetric matrices set this option to "ds_eigen_f" and for non symmetric to "dn_eigen_f".} } \value{ A vector of the length corresponding to the dimension of the input matrix. Containing the required \code{nev} eigenvalues. If requested also the corresponding eigenvectors. In the non symmetric case, the eigenvalues are returned in a matrix with a column containing the real parts and a column containing the imaginary parts of the eigenvalues. The eigenvectors are then returned in two matrices.} \details{ \describe{ \item{\code{mode = " "}:}{ there are different modes available for this function, each mode returns a different range of eigenvalues. Also the available modes are dependent, whether the input matrix is symmetric or not: \describe{ \item{\code{"LM"}:}{Eigenvalues with largest magnitude (sym, non sym), that is, largest eigenvalues in the Euclidean norm of complex numbers.} \item{\code{"SM"}:}{Eigenvalues with smallest magnitude (sym, non sym), that is, smallest eigenvalues in the Euclidean norm of complex numbers.} \item{\code{"LR"}:}{Eigenvalues with largest real part (non sym).} \item{\code{"SR"}:}{Eigenvalues with smallest real part (non sym).} \item{\code{"LI"}:}{Eigenvalues with largest imaginary part (non sym).} \item{\code{"SI"}:}{Eigenvalues with smallest imaginary part (non sym).} \item{\code{"LA"}:}{Eigenvalues with largest algebraic value (sym), that is, largest eigenvalues inclusive of any negative sign.} \item{\code{"SA"}:}{Eigenvalues with smallest algebraic value (syn), that is, smallest eigenvalues inclusive of any negative sign.} }% describe }% item \item{\code{ncv}:}{ the largest number of basis vectors that will be used in the Implicitly Restarted Arnoldi Process. Work per major iteration is proportional to x@dimension[1]*ncv*ncv. The default is set if \code{symmetric} to min(x@dimension[1] + 1, max(2 * nev + 1, 200)) or else to min(x@dimension[1] - 1, max(2 * nev + 1, 100)). Note, this value should not be chosen arbitrary large, but slightly larger than \code{nev}. Otherwise it could lead to memory allocation problems.} \item{\code{nitr}:}{ the maximum number of iterations. The default is set to \code{ncv + 1000}} \item{\code{spamflag = FALSE}:}{ if TRUE, the Implicitly Restarted Arnoldi Process is used, independent of the dimension of the respective matrix (provided matrix is larger than 10x10).} \item{\code{verbose = FALSE}:}{ print additional information.} \item{\code{cmplxeps}:}{ threshold to determine whether a double value is zero, while transforming the ARPACK output to R class complex. The default is set to \code{.Machine$double.eps}.} }% describe }% details \references{Lehoucq, R. B. and Sorensen, D. C. and Yang, C. (1997) \emph{ARPACK Users Guide: Solution of Large Scale Eigenvalue Problems by Implicitly Restarted Arnoldi Methods}.} \seealso{Option \code{"inefficiencywarning"} in \code{\link{spam.options}} and \code{\link{spam_random}}. } \examples{ set.seed(81) rspam <- spam_random(42^2, density = .0001, spd = TRUE) SPD <- eigen.spam(rspam, nev = 18, control = list(mode = "SM"), only.values = TRUE) any(SPD$values <= 0, na.rm = TRUE) isSymmetric(rspam) # hence the matrix is symmetric positiv definit rspam2 <- spam_random(50^2, density = .0001, spd = FALSE, sym = TRUE, distribution = rpois, lambda = 2) SNPD <- eigen.spam(rspam2, nev = 18, control = list(mode = "SM"), only.values = TRUE) any(SNPD$values <= 0, na.rm = TRUE) isSymmetric(rspam2) # hence the matrix is symmetric but not positiv definit } \author{Roman Flury, Reinhard Furrer} \keyword{algebra} spam/man/rmvnorm.const.Rd0000644000176200001440000000504014064660063015105 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/rmvnorm.const.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{rmvnorm.const} \alias{rmvnorm.const} \alias{rmvnorm.prec.const} \alias{rmvnorm.canonical.const} \title{Draw Constrainted Multivariate Normals} \description{ Fast ways to draw multivariate normals with linear constrains when the variance or precision matrix is sparse.} \usage{ rmvnorm.const(n, mu = rep.int(0, dim(Sigma)[1]), Sigma, Rstruct = NULL, A = array(1, c(1,dim(Sigma)[1])), a=0, U=NULL, ...) rmvnorm.prec.const(n, mu = rep.int(0, dim(Q)[1]), Q, Rstruct = NULL, A = array(1, c(1,dim(Q)[1])), a=0, U=NULL, ...) rmvnorm.canonical.const(n, b, Q, Rstruct = NULL, A = array(1, c(1,dim(Q)[1])), a=0, U=NULL, ...) } \arguments{ \item{n}{number of observations.} \item{mu}{mean vector.} \item{Sigma}{covariance matrix of class \code{spam}.} \item{Q}{precision matrix.} \item{b}{vector determining the mean.} \item{Rstruct}{the Cholesky structure of \code{Sigma} or \code{Q}.} \item{A}{Constrain matrix.} \item{a}{Constrain vector.} \item{U}{see below.} \item{\dots}{arguments passed to \code{chol}.} } \details{The functions \code{rmvnorm.prec} and \code{rmvnorm.canonical} do not requrie sparse precision matrices. For \code{rmvnorm.spam}, the differences between regular and sparse covariance matrices are too significant to be implemented here. \cr Often (e.g., in a Gibbs sampler setting), the sparsity structure of the covariance/precision does not change. In such setting, the Cholesky factor can be passed via \code{Rstruct} in which only updates are performed (i.e., \code{update.spam.chol.NgPeyton} instead of a full \code{chol}). } %\note{There is intentionally no \acronym{S3} distinction between the classes % \code{spam} and \code{spam.chol.}\emph{method}.} \references{See references in \code{\link{chol}}. } \seealso{\code{\link{rmvnorm.spam}}. } \examples{ # to be filled in } % backsolve( chol(as.matrix(V)[ord,ord]),iidsample)[iord,] % \author{Reinhard Furrer} \keyword{algebra} spam/man/Summary.Rd0000644000176200001440000000372514064660063013725 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/summary.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{Summary} \alias{Summary} \alias{Summary.spam} \alias{Summary,spam-method} \alias{all.spam} \alias{any.spam} \alias{max.spam} \alias{min.spam} \alias{prod.spam} \alias{range.spam} \alias{sum.spam} \alias{all,spam-method} \alias{any,spam-method} \alias{max,spam-method} \alias{min,spam-method} \alias{prod,spam-method} \alias{range,spam-method} \alias{sum,spam-method} \title{Rounding of Numbers} \description{Applies the \code{Math2} group functions to \code{spam} objects } \usage{# max(x,..., na.rm = FALSE) } \arguments{\item{x}{spam object.} \item{na.rm}{a logical indicating whether missing values should be removed.} } \value{If \code{structurebased=TRUE}, all functions operate on the vector \code{x@entries} and return the result thereof.\cr Conversely, if \code{structurebased=FALSE}, the result is identical to one with \code{as.matrix(x)} input. } \details{The \code{na.rm} argument is only meaninful if \code{NAOK=TRUE}. } %\references{ %} \seealso{\code{\link{Math.spam}} and \code{\link{Math2}}.} \examples{ getGroupMembers("Summary") smat <- diag.spam( runif(15)) range(smat) options(spam.structurebased=FALSE) range(smat) \dontrun{ max( log(spam(c(1,-1))), na.rm=TRUE) } # allow 'NA's first: # TODO # options(spam.NAOK=TRUE) # max( log(spam(c(1,-1))), na.rm=TRUE) } \author{Reinhard Furrer} \keyword{manip} % all any max min prod range sum spam/man/Coercion.Rd0000644000176200001440000000336414064660063014030 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/coercion.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{Coercion} \docType{class} \alias{as.vector} \alias{as.vector.spam} \alias{as.vector,spam-method} \alias{as.vector,spam.chol.NgPeyton-method} \title{Coercion to a Vector} \description{Coercion of \code{spam} matrices to proper vector objects } \usage{\S4method{as.vector}{spam}(x, mode = "any") } \arguments{\item{x}{spam object.} \item{mode}{character string naming an atomic mode or \code{"any"}/\code{"list"}/\code{"expression"}.} } \value{If \code{structurebased=TRUE}, the vector \code{x@entries}.\cr Conversely, if \code{structurebased=FALSE}, the result is identical to one with \code{as.vector(as.matrix(x))}. } \details{This coercion allows smooth transitions between different matrix formats, see example below.\cr The Cholesky factors are first transformed to a \code{spam} object. } %\references{ %} \seealso{\code{\link{spam.options}}} \examples{ x <- diag(2) ifelse( x, x, 1-x) ifelse( x, as.vector(x), 1-as.vector(x)) x <- diag.spam(2) options(spam.structurebased=FALSE) ifelse( x, as.vector(x), 1-as.vector(x)) options(spam.structurebased=TRUE) ifelse( x, as.vector(x), 1-as.vector(x)) } \author{Reinhard Furrer} \keyword{manip} spam/man/image.Rd0000644000176200001440000000445114261754031013345 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/image.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{image} \alias{image} \alias{image.spam} \alias{image.spam.chol} \alias{image,spam-method} %\alias{image,spam.chol.NgPeyton-method} \title{Display a Sparse Matrix as Color Image} \description{The function creates a grid of colored rectangles with colors corresponding to the values of the \code{spam} matrix. } \usage{ \S4method{image}{spam}(x, cex = NULL, ...) } \arguments{\item{x}{matrix of class \code{spam} or \code{spam.chol.NgPeyton}.} \item{cex}{for very large matrices, the dot size may need to be scaled.} \item{...}{any other arguments passed to \code{image.default} and \code{plot}.} } %\value{} \details{\code{getOption("spam.imagesize")} determines if the sparse matrix is coerced into a matrix and the plotted similarly to \code{image.default} or if the matrix is simply represented as a scatterplot with \code{pch="."}. The points are scaled according to \code{cex*getOption("spam.cex")/(nrow+ncol)}. For some devices or for non-square matrices, \code{cex} needs probably some adjustment.\cr The a zero matrix in \code{spam} format has as (1,1) entry the value zero and only missing entries are interpreted as \code{NA} in the scatter plot. } %\references{} \seealso{\code{\link{display}} and \code{\link{spam.options}}.\cr The code is based on \code{\link[graphics]{image}} of \code{graphics}. } \examples{ set.seed(13) smat <- spam_random(8) par(mfcol=c(1,2),pty='s') options(spam.imagesize=1000) image(smat) # or use better color schemes options(spam.imagesize=10) image(smat, cex=.25) smat <- spam_random(2^14, distribution=rnorm, density=1e-5, verbose=TRUE) par(mfcol=c(1,1), mai=c(.4,.4,.1,.1), pty='s') image(smat) } \author{Reinhard Furrer} \keyword{hplot} spam/man/spam-solve.Rd0000644000176200001440000001221514064660063014350 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/solve.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{spam-solve} \alias{solve} \alias{backsolve} \alias{forwardsolve} \alias{backsolve-methods} \alias{backsolve,ANY-method} \alias{backsolve,spam-method} \alias{backsolve,matrix-method} \alias{backsolve.spam} \alias{forwardsolve-methods} \alias{forwardsolve,ANY-method} \alias{forwardsolve,spam-method} \alias{forwardsolve,matrix-method} \alias{forwardsolve.spam} \alias{chol2inv} \alias{chol2inv.spam} \alias{chol2inv,spam-method} \alias{chol2inv,spam.chol.NgPeyton-method} \alias{solve.spam} \alias{solve,ANY-method} \alias{solve,spam-method} \title{Linear Equation Solving for Sparse Matrices} \description{ \code{backsolve} and \code{forwardsolve} solve a system of linear equations where the coefficient matrix is upper or lower triangular. \cr \code{solve} solves a linear system or computes the inverse of a matrix if the right-hand-side is missing. } \usage{ \S4method{solve}{spam}(a, b, Rstruct=NULL, \dots) \S4method{backsolve}{spam}(r, x, \dots) \S4method{forwardsolve}{spam}(l, x, \dots) \S4method{chol2inv}{spam}(x, \dots) } \arguments{ \item{a}{symmetric positive definite matrix of class \code{spam} or a Cholesky factor as the result of a \code{chol} call.} \item{l,r}{object of class \code{spam} or \code{spam.chol.}\emph{method} returned by the function \code{chol}.} \item{x,b}{vector or regular matrix of right-hand-side(s) of a system of linear equations.} \item{Rstruct}{the Cholesky structure of \code{a}.} \item{\dots}{further arguments passed to or from other methods, see \sQuote{Details} below.} } \details{ We can solve \code{A \%*\% x = b} by first computing the Cholesky decomposition \code{A = t(R)\%*\%R)}, then solving \code{t(R)\%*\%y = b} for \code{y}, and finally solving \code{R\%*\%x = y} for \code{x}. \code{solve} combines \code{chol}, a Cholesky decomposition of a symmetric positive definite sparse matrix, with \code{forwardsolve} and then \code{backsolve}.\cr In case \code{a} is from a \code{chol} call, then \code{solve} is an efficient way to calculate \code{backsolve(a, forwardsolve( t(a), b))}. However, for \code{a.spam} and \code{a.mat} from a \code{chol} call with a sparse and ordinary matrix, note that \code{forwardsolve( a.mat, b, transpose=T, upper.tri=T)} is equivalent to \code{forwardsolve( t(a.mat), b)} and \code{backsolve(a.spam, forwardsolve(a.spam, b, transpose=T, upper.tri=T))} yields the desired result. But \code{backsolve(a.spam,forwardsolve(t(a.spam), resid))} is wrong because \code{t(a.spam)} is a \code{spam} and not a \code{spam.chol.NgPeyton} object. \code{forwardsolve} and \code{backsolve} solve a system of linear equations where the coefficient matrix is lower (\code{forwardsolve}) or upper (\code{backsolve}) triangular. Usually, the triangular matrix is result from a \code{chol} call and it is not required to transpose it for \code{forwardsolve}. Note that arguments of the default methods \code{k}, \code{upper.tri} and \code{transpose} do not have any effects here. Notice that it is more efficient to solve successively the linear equations (both triangular solves) than to implement these in the Fortran code. If the right-hand-side in \code{solve} is missing it will compute the inverse of a matrix. For details about the specific Cholsesky decomposition, see \code{\link{chol}}. Recall that the Cholesky factors are from ordered matrices. \code{chol2inv(x)} is a faster way to \code{solve(x)}. } \note{There is intentionally no \acronym{S3} distinction between the classes \code{spam} and \code{spam.chol.}\emph{method}.} \references{See references in \code{\link{chol}}. } \seealso{\code{\link{chol.spam}} and \code{\link{ordering}}. } \examples{ # Generate multivariate form a covariance inverse: # (usefull for GRMF) set.seed(13) n <- 25 # dimension N <- 1000 # sample size Sigmainv <- .25^abs(outer(1:n,1:n,"-")) Sigmainv <- as.spam( Sigmainv, eps=1e-4) Sigma <- solve( Sigmainv) # for verification iidsample <- array(rnorm(N*n),c(n,N)) mvsample <- backsolve( chol(Sigmainv), iidsample) norm( var(t(mvsample)) - Sigma) # compare with: mvsample <- backsolve( chol(as.matrix( Sigmainv)), iidsample, n) #### ,n as patch norm( var(t(mvsample)) - Sigma) # 'solve' step by step: b <- rnorm( n) R <- chol(Sigmainv) norm( backsolve( R, forwardsolve( R, b))- solve( Sigmainv, b) ) norm( backsolve( R, forwardsolve( R, diag(n)))- Sigma ) # 'update': R1 <- update( R, Sigmainv + diag.spam( n)) } % backsolve( chol(as.matrix(V)[ord,ord]),iidsample)[iord,] % \author{Reinhard Furrer, based on Ng and Peyton (1993) Fortran routines} \keyword{algebra} spam/man/landkreis.Rd0000644000176200001440000000411414064660063014235 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/landkreis.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{map.landkreis} \alias{map.landkreis} \title{Administrative districts of Germany} \description{Displaying data over the administrative districts of Germany} \usage{ map.landkreis(data, col=NULL, zlim=range(data), add=FALSE, legendpos=c( 0.88,0.9,0.05,0.4)) } \arguments{ \item{data}{vector of length 544} \item{col}{color scheme to be used. By default uses \code{tim.colors} if available or a generic gray scale.} \item{zlim}{the minimum and maximum values for which colors should be plotted, defaulting to the range of \code{data}.} \item{add}{logical, if true adds to current plot.} \item{legendpos}{if package \pkg{fields} is loaded, puts a legend at that position.} } \references{The code of \code{map.landkreis} is very similar to \code{germany.map} from the package \pkg{INLA}.} \details{The function \code{\link{germany.plot}} super-seeds \code{map.landkreis} (it is several factors faster). \cr The perfect position of the legend is an art per se and depends on various \code{par} parameters. See also the source code of the function \code{image.plot} of \pkg{fields}.} \seealso{\code{\link{germany.plot}} super-seeding \code{map.landkreis}.} \examples{ \dontrun{ data( Oral) par( mfcol=c(1,2)) germany.plot( log( Oral$Y), legend=TRUE) map.landkreis( log( Oral$Y)) } } \author{Reinhard Furrer} \keyword{hplot} % dev.off() % dev.off();system.time( for (i in 1:20) map.landkreis(1:544)) % dev.off();system.time( for (i in 1:20) germany.plot(1:544)) spam/man/large_matrix.Rd0000644000176200001440000000420114064660063014734 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/large_matrix.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{large_matrix} \alias{large_matrix} \alias{large matrix} \alias{large_matries} \alias{large matries} \alias{64bit} \alias{64bits} \alias{long vector} \alias{long vectors} \alias{spam64} \title{Large 64-bit matrices require the R package \pkg{spam64}} \description{The R package \pkg{spam} can handle sparse matrices with up to 2^31-1 non-zero elements. For matrices with more non-zero elements it is necessary to load the \pkg{spam64} package in addition. } \details{With the help of the R package \pkg{dotCall64} spam interfaces either the compiled code with 32-bit integers provided in \pkg{spam} or the compiled code with 64-bit integers provided in \pkg{spam64}. \cr To mimick 64-bit behavior, set \code{options(spam.force64 = TRUE)}. The subsequent matrix indices are then stored in double format. } \references{ F. Gerber, K. Moesinger, R. Furrer (2017), Extending R packages to support 64-bit compiled code: An illustration with spam64 and GIMMS NDVI3g data, Computer & Geoscience 104, 109-119, https://doi.org/10.1016/j.cageo.2016.11.015. } \seealso{ \code{\link[spam64]{spam64-package}}, \code{\link[dotCall64]{dotCall64}}. } \examples{ \dontrun{ ## the following matrices are very large, and hence, ## require much memory and cpu time. library("spam64") s1 <- spam(1, ncol=2^30) # 32-bit matrix s1 s2 <- cbind(s1, s1) # 64-bit matrix s2 s3 <- spam(1, ncol=2^31) # 64-bit matrix s3 } } \author{Reinhard Furrer, Florian Gerber, Kaspar Moesinger, Daniel Gerber} \keyword{array} \keyword{algebra} spam/man/germanydata.Rd0000644000176200001440000000431414261754260014561 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/germanydata.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{germany.data} \alias{germany.data} \alias{germany.info} \alias{germany.poly} \alias{germany.spam} \alias{germany} \docType{data} \title{Meta-data About Administrative Districts of Germany} \description{Supplementary data used for the display of data from the administrative districts of Germany} \format{\code{germany.info} is a list with elements \describe{ \item{n}{544 (number of districts around 1990).} \item{xrep,yrep}{representative coordinates of the districts (vectors of length 544)} \item{xlim,ylim}{2-vectors defining the limits of the districts.} \item{polyid}{linking the polygons to the districts (599 vector).} \item{id}{linking the districts to Community Identification Number.}} \code{germany.poly} defines the polygons. It is a 17965 by two matrix, each polygon separated by a row of \code{NA}s, each district by two rows.\cr \code{germany} defines the polygons in form of a list (backwards compatibility). } \references{The meta-data has been constructed based on (essentially) files from the package \pkg{INLA}, see \code{demo(Bym)}.\cr See also \url{https://de.wikipedia.org/wiki/Amtlicher_Gemeindeschl\%C3\%BCssel} and \url{https://en.wikipedia.org/wiki/Districts_of_Germany}} \details{The representative coordinates are calculated based on the mean value of the polygon coordinates. This creates sometimes strange values, e.g., district Leer.} \seealso{\code{\link{germany.plot}} \code{\link{Oral}}.} \examples{ # Plot the Bundeslaender: germany.plot(germany.info$id\%/\%1000,col=rep(2:8,3), legend=FALSE) } \author{Reinhard Furrer} \keyword{hplot} spam/man/crossprod.Rd0000644000176200001440000000367414513547656014324 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/crossprod.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{crossprod} \alias{crossprod.default} \alias{crossprod.spam} \alias{tcrossprod.spam} \alias{crossprod,spam,missing-method} \alias{tcrossprod,spam,missing-method} \alias{crossprod,ANY,spam-method} \alias{tcrossprod,ANY,spam-method} \alias{crossprod,spam,spam-method} \alias{tcrossprod,spam,spam-method} \alias{crossprod,spam,ANY-method} \alias{tcrossprod,spam,ANY-method} \title{Spam Matrix Crossproduct} \description{ Given matrices \code{x} and \code{y} as arguments, return a matrix cross-product. This is formally equivalent to (but usually slightly faster than) the call \code{t(x) \%*\% y} (\code{crossprod.spam}) or \code{x \%*\% t(y)} (\code{tcrossprod.spam}).} \usage{ crossprod.spam(x, y = NULL, \dots) tcrossprod.spam(x, y = NULL, \dots) } \arguments{ \item{x, y}{matrices: \code{y = NULL} is taken to be the same matrix as \code{x}. Vectors are promoted to single-column or single-row matrices, depending on the context.} \item{\dots}{potentially further arguments from other methods.} } \value{A double matrix} \note{ When \code{x} or \code{y} are not matrices, they are treated as column or row matrices. } %\references{} %\seealso{\code{\link{chol}}} \examples{ crossprod.spam(diag.spam(2),1:2) } \author{Reinhard Furrer} \keyword{array} \keyword{algebra} spam/man/ordering.Rd0000644000176200001440000000507614412751662014105 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/ordering.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{ordering} \docType{methods} \alias{ordering} \alias{ordering.spam} \alias{ordering-methods} %\alias{ordering,spam.chol.NgPeyton-method} \alias{ordering.spam.chol} \alias{ordering.spam.chol.NgPeyton} \alias{ordering,spam-method} \alias{ordering,matrix-method} \title{Extract the permutation} \description{Extract the (inverse) permutation used by the Cholesky decomposition} \usage{ ordering( x, inv=FALSE) } \arguments{ \item{x}{object of class \code{spam.chol.}\emph{method} returned by the function \code{chol}.} \item{inv}{Return the permutation (default) or inverse thereof.} } \details{ Recall that calculating a Cholesky factor from a sparse matrix consists of finding a permutation first, then calculating the factors of the permuted matrix. The ordering is important when working with the factors themselves.\cr The ordering from a full/regular matrix is \code{1:n}.\cr Note that there exists many different algorithms to find orderings. \cr See the examples, they speak more than 10 lines. } \seealso{\code{\link{chol.spam}}, \code{\link{solve.spam}}. } \examples{ # Construct a pd matrix S to work with (size n) n <- 100 # dimension S <- .25^abs(outer(1:n,1:n,"-")) S <- as.spam( S, eps=1e-4) I <- diag(n) # Identity matrix cholS <- chol( S) ord <- ordering(cholS) iord <- ordering(cholS, inv=TRUE) R <- as.spam( cholS ) # R'R = P S P', with P=I[ord,], # a permutation matrix (rows permuted). RtR <- t(R) \%*\% R # the following are equivalent: as.spam( RtR - S[ord,ord], eps=1e-15) as.spam( RtR[iord,iord] - S, eps=1e-15) as.spam( t(R[,iord]) \%*\% R[,iord] - S, eps=1e-15) # we use 'eps' to avoid issues close to machine precision # trivially: as.spam( t(I[iord,]) - I[ord,]) # (P^-1)' = P as.spam( t(I[ord,]) - I[,ord]) # as.spam( I[iord,] - I[,ord]) as.spam( I[ord,]\%*\%S\%*\%I[,ord] - S[ord,ord] ) # pre and post multiplication with P and P' is ordering } \author{Reinhard Furrer} \keyword{algebra} spam/man/complexity.Rd0000644000176200001440000000443514064660063014464 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/complexity.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{complexity} \alias{complexity} \alias{complexities} \title{Complexity for Sparse Matrices} \description{A few results of computational complexities for selected sparse algoritms in \code{spam} } \details{A Cholesky factorization of an n-matrix requires n^3/3 flops. In case of banded matrices (bandwidth p, p< https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{options} \alias{spam.options} \alias{options.spam} \alias{getOption.spam} \title{Options Settings} \description{ Allow the user to set and examine a variety of \emph{options} which affect the way in which \R computes and displays sparse matrix results. } \details{ Invoking \code{options()} with no arguments returns a list with the current values of the options. To access the value of a single option, one should use \code{getOption("spam.eps")}, e.g., rather than \code{options("spam.eps")} which is a \emph{list} of length one.\cr Of course, printing is still subordinate to \code{getOption("max.print")} or similar options. } \value{ For \code{getOption}, the current value set for option \code{x}, or \code{NULL} if the option is unset. For \code{options()}, a list of all set options sorted by category. For \code{options(name)}, a list of length one containing the set value, or \code{NULL} if it is unset. For uses setting one or more options, a list with the previous values of the options changed (returned invisibly). } \section{Options used for the package \code{spam}}{ A short description with the default values follows. \describe{ \item{\code{spam.eps=.Machine$double.eps}:}{values smaller than this are considered as zero. This is only used when creating spam objects.} \item{\code{spam.drop=FALSE}:}{default parameter for \code{drop} when subsetting} \item{\code{spam.printsize=100}:}{the max number of elements of a matrix which we display as regular matrix.} \item{\code{spam.imagesize=10000}:}{the max number of elements of a matrix we display as regular matrix with \code{image} or \code{display}. Larger matrices are represented as dots only.} \item{\code{spam.cex=1200}:}{default dot size for \code{image} or \code{display}.} \item{\code{spam.structurebased=FALSE}:}{should operations be carried out on the nonzero entries (the structure) or including the zeros.} \item{\code{spam.inefficiencywarning=1e6}:}{issue a warning when inefficient operations are performed and the matrix exceeds the specified size. Valid value is a postive integer or a logical. \code{TRUE} corresponds to 1 (always), \code{FALSE} to \code{Inf}.} \item{\code{spam.trivalues=FALSE}:}{a flag whether to return the structure (\code{FALSE}) or the values themselves (\code{TRUE}) when returning the upper and lower triangular part of a matrix.} \item{\code{spam.listmethod="PE"}:}{algorithm for \code{spam.list}. Default is suggestion by Paul Eilers (thanks). Any other specification uses a bubble sort algorithm which is only slightly faster for very sparse matrices. } \item{\code{spam.dopivoting=TRUE}:}{default parameter for "\code{solve}" routines. \code{FALSE} would solve the system without using the permutation.} \item{\code{spam.NAOK=FALSE}:}{logical determines if \code{NA}, \code{NaN} and \code{Inf} are allowed to Fortan. Setting to \code{TRUE} allows to work with these but full functionality has not been tested.} \item{\code{spam.safemodevalidity=TRUE}:}{logical determines if sanity check is peformed when constructing sparse matrices. Default is safer but somewhat slower.} \item{\code{spam.cholsymmetrycheck=TRUE}:}{for the Cholesky factorization, verify if the matrix is symmetric.} \item{\code{spam.cholpivotcheck=TRUE}:}{for the Cholesky factorization, when passing a permutation, should a minimum set of checks be performed?} \item{\code{spam.cholupdatesingular="warning"}:}{for a Cholesky update, what happens if the matrix is singular: \code{"warning"} only and returning the not updated factor, \code{"error"} or return simply \code{"NULL"}.} \item{\code{spam.cholincreasefactor=c(1.25,1.25)}:}{If not enought memory could be allocated, these are the steps to increase it.} \item{\code{spam.nnznearestdistnnz=c(400^2,400)}:}{Memory allocation parameters for \code{nearest.dist}.} \item{\code{spam.nearestdistincreasefactor=1.25}:}{If not enought memory could be allocated, this is the step to increase it. } } } \seealso{Functions influenced by these options include: \code{\link{print.spam}}, \code{\link{display.spam}}, \code{\link{image.spam}}, \code{\link{upper.tri.spam}}, \code{\link{chol.spam}}, \code{\link{nearest.dist}}, etc.\cr \code{\link{powerboost}}\cr } \examples{ smat <- diag.spam( 1:8) smat options(spam.printsize=49) smat # List all spam options: options()[grep("spam",names(options()))] # Reset to default values: options(spam.eps=.Machine$double.eps, spam.drop=FALSE, spam.printsize=100, spam.imagesize=10000, spam.cex=1200, spam.structurebased=FALSE, spam.inefficiencywarning=1e6, spam.trivalues=FALSE, spam.listmethod="PE", spam.NAOK=FALSE, spam.safemodevalidity=TRUE, spam.dopivoting=TRUE, spam.cholsymmetrycheck=TRUE, spam.cholpivotcheck=TRUE, spam.cholupdatesingular="warning", spam.cholincreasefactor=c(1.25,1.25), spam.nearestdistincreasefactor=1.25, spam.nearestdistnnz=c(400^2,400)) } \keyword{IO} \keyword{environment} \keyword{error} \keyword{print} spam/man/print.Rd0000644000176200001440000000543314261754077013432 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/print.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{print} \docType{methods} \alias{print} \alias{print.spam} \alias{print,spam-method} %\alias{print,spam.chol.NgPeyton-method} \alias{print.spam.chol} \alias{print.spam.chol.NgPeyton} \alias{summary.spam} \alias{summary,spam-method} %\alias{summary,spam.chol.NgPeyton-method} \alias{summary.spam.chol} \alias{summary.spam.chol.NgPeyton} \alias{print_nnzpos} \title{Printing and Summarizing Sparse Matrices} \description{Printing (non-zero elements) of sparse matrices and summarizing the sparsity structure thereof. } \usage{ \S4method{print}{spam}(x, ...) \S4method{summary}{spam}(object, ...) } \arguments{\item{x}{matrix of class \code{spam} or \code{spam.chol.}\emph{method}.} \item{object}{matrix of class \code{spam} or \code{spam.chol.}\emph{method}.} \item{...}{any other arguments passed to \code{print.default}. If the non-standard argument \code{minimal} is set to \code{FALSE}, an extended spam print is available with logical argument \code{rowpointer} to print rowpointers, and \code{zerosymbol} defining the character to display the zero element.} } \value{\code{NULL} for \code{print}, because the information is printed with \code{cat} there is no real need to pass any object back. \cr % A list containing the non-zero elements and the density for \code{summary} for class \code{spam}.\cr % A list containing the non-zero elements of the factor, the density and the fill-in for \code{summary} for class \code{spam.chol.NgPeyton}.} \details{\code{getOption('spam.printsize')} determines if the sparse matrix is coerced into a matrix and the printed as an array or if only the non-zero elements of the matrix are given. } %\references{} \seealso{\code{\link{display}} or \code{\link{image}} for a graphical visualization; \code{\link{spam.options}}} \examples{ set.seed(13) smat <- spam_random(8) par(mfcol=c(1,2),pty='s') options(spam.printsize=1000) print(smat) options(spam.printsize=10) print(smat) summary(smat) summary(smat)$nnz smat@entries[1:5] <- 0 print(smat, minimal = FALSE) print(smat, minimal = FALSE, rowpointer = TRUE) smat@rowpointers print_nnzpos(smat) } \author{Reinhard Furrer} \keyword{hplot} spam/man/display.Rd0000644000176200001440000000363414064660063013734 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/display.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{display} \alias{display} \alias{display.spam} \alias{display,spam-method} %\alias{display,spam.chol.NgPeyton-method} \title{Graphially Represent the Nonzero Entries} \description{The function represents the nonzero entries in a simple bicolor plot. } \usage{ display(x, ...) } \arguments{\item{x}{matrix of class \code{spam} or \code{spam.chol.NgPeyton}.} \item{...}{any other arguments passed to \code{image.default}/\code{plot}.} } %\value{} \details{\code{spam.getOption("imagesize")} determines if the sparse matrix is coerced into a matrix and the plotted with \code{image.default} or if the matrix is simply represented as a scatterplot with \code{pch="."}. The points are scaled according to \code{cex*getOption("spam.cex")/(nrow + ncol)}. For some devices or for non-square matrices, \code{cex} needs probably some adjustment. } %\references{} \seealso{\code{\link{image}}, \code{\link{spam.options}}} \examples{ set.seed(13) smat <- spam_random(8) par(mfcol=c(1,2), pty='s') options(spam.imagesize = 1000) display(smat) options(spam.imagesize = 10) display(smat, cex=.25) # very large but very sparse matrix smat <- spam_random(2^14, distribution=rnorm, density=1e-5, verbose=TRUE) par(mfcol=c(1, 1), mai=c(.4,.4,.1,.1), pty='s') display(smat) } \author{Reinhard Furrer} \keyword{hplot} spam/man/chol.Rd0000644000176200001440000001532214064660063013211 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/chol.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{chol} \alias{chol} \alias{chol.spam} \alias{chol,ANY-method} \alias{chol,matrix-method} \alias{chol,spam-method} \alias{update.spam} \alias{update,spam.chol.NgPeyton-method} \alias{update.spam.chol.NgPeyton} \title{Cholesky Factorization for Sparse Matrices} \description{ \code{chol} performs a Cholesky decomposition of a symmetric positive definite sparse matrix \code{x} of class \code{spam}.} \usage{ # chol(x, \dots) \S4method{chol}{spam}(x, pivot = "MMD", method = "NgPeyton", memory = list(), eps = getOption("spam.eps"), Rstruct=NULL, \dots, verbose=FALSE) %force64 = getOption("spam.force64"),\dots) # update.spam.chol.NgPeyton(object, x,...) \S4method{update}{spam.chol.NgPeyton}(object, x,...) %chol(x, method, ordering, memory, \dots) } \arguments{ \item{x}{symmetric positive definite matrix of class \code{spam}.} \item{pivot}{should the matrix be permuted, and if, with what algorithm, see \sQuote{Details} below.} \item{method}{Currently, only \code{NgPeyton} is implemented.} \item{memory}{Parameters specific to the method, see \sQuote{Details} below.} \item{eps}{threshold to test symmetry. Defaults to \code{getOption("spam.eps")}.} %\item{force64}{logical vector of length 1. If \code{TRUE}, a 64-bit % spam matrix is returned in any case. If \code{FALSE}, a 32-bit % matrix is returned when possible. } \item{Rstruct}{sparsity structure of the factor, see \sQuote{Details} below.} \item{\dots}{further arguments passed to or from other methods.} \item{object}{an object from a previous call to \code{chol}, i.e., sparsity structure of the factor.} \item{verbose}{provides more details about the decomposition. Useful when working with huge matrices.} } \value{The function returns the Cholesky factor in an object of class \code{spam.chol.}\emph{method}. Recall that the latter is the Cholesky factor of a reordered matrix \code{x}, see also \code{\link{ordering}}. } \details{\code{chol} performs a Cholesky decomposition of a symmetric positive definite sparse matrix \code{x} of class \code{spam}. Currently, there is only the block sparse Cholesky algorithm of Ng and Peyton (1993) implemented (\code{method="NgPeyton"}). To pivot/permute the matrix, you can choose between the multiple minimum degree (\code{pivot="MMD"}) or reverse Cuthill-Mckee (\code{pivot="RCM"}) from George and Lui (1981). It is also possible to furnish a specific permutation in which case \code{pivot} is a vector. For compatibility reasons, \code{pivot} can also take a logical in which for \code{FALSE} no permutation is done and for \code{TRUE} is equivalent to \code{MMD}.\cr Often the sparsity structure is fixed and does not change, but the entries do. In those cases, we can update the Cholesky factor with \code{update.spam.chol.NgPeyton} by suppling a Cholesky factor and the updated matrix. For \code{U <- chol(A)}, \code{update(U, Anew)} and \code{chol(Anew, Rstruct=U)} are equivalent. The option \code{cholupdatesingular} determines how singular matrices are handled by \code{update}. The function hands back an error (\code{"error"}), a warning (\code{"warning"}) or the value \code{NULL} (\code{"null"}).\cr The Cholesky decompositions requires parameters, linked to memory allocation. If the default values are too small the Fortran routine returns an error to \R, which allocates more space and calls the Fortran routine again. The user can also pass better estimates of the allocation sizes to \code{chol} with the argument \code{memory=list(nnzR=..., nnzcolindices=...)}. The minimal sizes for a fixed sparsity structure can be obtained from a \code{summary} call, see \sQuote{Examples}.\cr The output of \code{chol} can be used with \code{forwardsolve} and \code{backsolve} to solve a system of linear equations.\cr Notice that the Cholesky factorization of the package \code{SparseM} is also based on the algorithm of Ng and Peyton (1993). Whereas the Cholesky routine of the package \code{Matrix} are based on \code{CHOLMOD} by Timothy A. Davis (\code{C} code). } \references{ Ng, E. G. and Peyton, B. W. (1993) Block sparse Cholesky algorithms on advanced uniprocessor computers, \emph{SIAM J. Sci. Comput.}, \bold{14}, 1034--1056. Gilbert, J. R., Ng, E. G. and Peyton, B. W. (1994) An efficient algorithm to compute row and column counts for sparse Cholesky factorization, \emph{SIAM J. Matrix Anal. Appl.}, \bold{15}, 1075--1091. George, A. and Liu, J. (1981) \emph{Computer Solution of Large Sparse Positive Definite Systems}, Prentice Hall. } \note{ Although the symmetric structure of \code{x} is needed, only the upper diagonal entries are used. By default, the code does check for symmetry (contrarily to \code{base:::chol}). However, depending on the matrix size, this is a time consuming test. A test is ignored if \code{options("spam.cholsymmetrycheck")} is set to \code{FALSE}. If a permutation is supplied with \code{pivot}, \code{options("spam.cholpivotcheck")} determines if the permutation is tested for validity (defaults to \code{TRUE}). } \seealso{\code{\link{det.spam}}, \code{\link{solve.spam}}, \code{\link{forwardsolve.spam}}, \code{\link{backsolve.spam}} and \code{\link{ordering}}. } \examples{ # generate multivariate normals: set.seed(13) n <- 25 # dimension N <- 1000 # sample size Sigma <- .25^abs(outer(1:n,1:n,"-")) Sigma <- as.spam( Sigma, eps=1e-4) cholS <- chol( Sigma) # cholS is the upper triangular part of the permutated matrix Sigma iord <- ordering(cholS, inv=TRUE) R <- as.spam(cholS) mvsample <- ( array(rnorm(N*n),c(N,n)) \%*\% R)[,iord] # It is often better to order the sample than the matrix # R itself. # 'mvsample' is of class 'spam'. We need to transform it to a # regular matrix, as there is no method 'var' for 'spam' (should there?). norm( var( as.matrix( mvsample)) - Sigma, type='m') norm( t(R) \%*\% R - Sigma) # To speed up factorizations, memory allocations can be optimized: opt <- summary(cholS) # here, some elements of Sigma may be changed... cholS <- chol( Sigma, memory=list(nnzR=opt$nnzR,nnzcolindices=opt$nnzc)) } % backsolve( chol(as.matrix(V)[ord,ord]),iidsample)[iord,] % \author{Reinhard Furrer, based on Ng and Peyton (1993) Fortran routines} \keyword{algebra} spam/man/Math2.Rd0000644000176200001440000000311614064660063013235 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/math2.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{Math2} \alias{Math2} \alias{Math2.spam} \alias{Math2,spam-method} \alias{Math2,spam,numeric-method} \alias{round,spam-method} \alias{signif,spam-method} \alias{round.spam} \alias{signif.spam} \title{Rounding of Numbers} \description{Applies the \code{Math2} group functions to '\code{spam}' objects } \usage{\S4method{round}{spam}(x, digits = 0) \S4method{signif}{spam}(x, digits = 6) } \arguments{\item{x}{spam object.} \item{digits}{integer indicating the precision to be used.} } \value{All functions operate on the vector \code{x@entries} and return the result thereof. } %\details{% Is implemented for R>=2.3.x only. However, % it would be possible to use Martin's proposed workaround: % \url{http://tolstoy.newcastle.edu.au/R/help/05/12/18192.html} %\references{ %} \seealso{\code{\link{Ops.spam}} and \code{\link{Math.spam}}} \examples{ getGroupMembers("Math2") smat <- diag.spam( rnorm(15)) round(smat, 3) } \author{Reinhard Furrer} \keyword{manip} % "round" "signif" spam/man/USprecip.Rd0000644000176200001440000000355114261754455014027 0ustar liggesusers% HEADER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is file spam/man/USprecip.Rd. % % It is part of the R package spam, % % --> https://CRAN.R-project.org/package=spam % % --> https://CRAN.R-project.org/package=spam64 % % --> https://git.math.uzh.ch/reinhard.furrer/spam % % by Reinhard Furrer [aut, cre], Florian Gerber [aut], % % Roman Flury [aut], Daniel Gerber [ctb], % % Kaspar Moesinger [ctb] % % HEADER END %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \name{USprecip} \alias{USprecip} \docType{data} \title{Monthly Total Precipitation (mm) for April 1948 in the Contiguous United States} \description{ This is a useful spatial data set of moderate to large size consisting of 11918 locations. See \url{https://www.image.ucar.edu/GSP/Data/US.monthly.met/} for the source of these data. } \format{ This data set is an array containing the following columns: \describe{ \item{lon,lat}{ Longitude-latitude position of monitoring stations. } \item{raw}{ Monthly total precipitation in millimeters for April 1948. } \item{anomaly}{ Preipitation anomaly for April 1948. } \item{infill}{ Indicator, which station values were observed (5906 out of the 11918) compared to which were estimated. } } } \source{\url{https://www.image.ucar.edu/GSP/Data/US.monthly.met/}} \seealso{\code{\link[fields]{RMprecip}}} \references{ Johns, C., Nychka, D., Kittel, T., and Daly, C. (2003) Infilling sparse records of spatial fields. \emph{Journal of the American Statistical Association}, 98, 796--806. } \examples{ # plot \dontrun{ library(fields) data(USprecip) par(mfcol=c(2,1)) quilt.plot(USprecip[,1:2],USprecip[,3]) US( add=TRUE, col=2, lty=2) quilt.plot(USprecip[,1:2],USprecip[,4]) US( add=TRUE, col=2, lty=2) } } \keyword{datasets} spam/DESCRIPTION0000644000176200001440000000731114515436432012731 0ustar liggesusersPackage: spam Type: Package Title: SPArse Matrix Version: 2.10-0 Date: 2023-10-23 Authors@R: c(person("Reinhard", "Furrer", role = c("aut", "cre"), email = "reinhard.furrer@math.uzh.ch", comment = c(ORCID = "0000-0002-6319-2332")), person("Florian", "Gerber", role = c("aut"), email = "florian.gerber@math.uzh.ch", comment = c(ORCID = "0000-0001-8545-5263")), person("Roman", "Flury", role = c("aut"), email = "roman.flury@math.uzh.ch", comment = c(ORCID = "0000-0002-0349-8698")), person("Daniel", "Gerber", role = "ctb", email = "daniel_gerber_2222@hotmail.com"), person("Kaspar", "Moesinger", role = "ctb", email = "kaspar.moesinger@gmail.com"), person("Cincera", "Annina", email = "annina.cincera@math.uzh.ch", role = "ctb"), person("Youcef", "Saad", role = "ctb", comment = "SPARSEKIT http://www-users.cs.umn.edu/~saad/software/SPARSKIT/"), person(c("Esmond", "G."), "Ng", role = "ctb", comment = "Fortran Cholesky routines"), person(c("Barry", "W."), "Peyton", role = "ctb", comment = "Fortran Cholesky routines"), person(c("Joseph", "W.H."), "Liu", role = "ctb", comment = "Fortran Cholesky routines"), person(c("Alan", "D."), "George", role = "ctb", comment = "Fortran Cholesky routines"), person(c("Lehoucq", "B."), "Rich", role = "ctb", comment = "ARPACK"), person(c("Maschhoff"), "Kristi", role = "ctb", comment = "ARPACK"), person(c("Sorensen", "C."), "Danny", role = "ctb", comment = "ARPACK"), person(c("Yang"), "Chao", role = "ctb", comment = "ARPACK")) Depends: R (>= 3.5) Imports: dotCall64, grid, methods, Rcpp (>= 1.0.8.3) LinkingTo: Rcpp Suggests: spam64, fields, Matrix, testthat, R.rsp, truncdist, knitr, rmarkdown VignetteBuilder: R.rsp, knitr Description: Set of functions for sparse matrix algebra. Differences with other sparse matrix packages are: (1) we only support (essentially) one sparse matrix format, (2) based on transparent and simple structure(s), (3) tailored for MCMC calculations within G(M)RF. (4) and it is fast and scalable (with the extension package spam64). Documentation about 'spam' is provided by vignettes included in this package, see also Furrer and Sain (2010) ; see 'citation("spam")' for details. LazyData: true License: LGPL-2 | BSD_3_clause + file LICENSE URL: https://www.math.uzh.ch/pages/spam/ BugReports: https://git.math.uzh.ch/reinhard.furrer/spam/-/issues NeedsCompilation: yes Packaged: 2023-10-23 07:47:45 UTC; furrer Author: Reinhard Furrer [aut, cre] (), Florian Gerber [aut] (), Roman Flury [aut] (), Daniel Gerber [ctb], Kaspar Moesinger [ctb], Cincera Annina [ctb], Youcef Saad [ctb] (SPARSEKIT http://www-users.cs.umn.edu/~saad/software/SPARSKIT/), Esmond G. Ng [ctb] (Fortran Cholesky routines), Barry W. Peyton [ctb] (Fortran Cholesky routines), Joseph W.H. Liu [ctb] (Fortran Cholesky routines), Alan D. George [ctb] (Fortran Cholesky routines), Lehoucq B. Rich [ctb] (ARPACK), Maschhoff Kristi [ctb] (ARPACK), Sorensen C. Danny [ctb] (ARPACK), Yang Chao [ctb] (ARPACK) Maintainer: Reinhard Furrer Repository: CRAN Date/Publication: 2023-10-23 09:30:02 UTC spam/build/0000755000176200001440000000000014515422441012313 5ustar liggesusersspam/build/vignette.rds0000644000176200001440000000037214515422441014654 0ustar liggesusersuP0_k"^h EK?zɭiݙYrBib44,|'6E%މf2BN\pߢzj8@\HN7 Appevi]qU*$:[UX |Ҍ R7-MK?`%0.;] https://CRAN.R-project.org/package=spam # # --> https://CRAN.R-project.org/package=spam64 # # --> https://git.math.uzh.ch/reinhard.furrer/spam # # by Reinhard Furrer [aut, cre], Florian Gerber [aut], # # Roman Flury [aut], Daniel Gerber [ctb], # # Kaspar Moesinger [ctb] # # HEADER END ################################################ # JSS article: # "Pitfalls in the implementation of Bayesian # hierarchical modeling of areal count data. # An illustration using BYM and Leroux models." # # test the MCMC sampler from the paper with 30 iterations. # SETUP: library("spam") options(spam.structurebased=TRUE) # BYM --------------------------------------------- data(Oral); attach(Oral) path <- system.file("demodata/germany.adjacency", package = "spam") A <- adjacency.landkreis(path); n <- dim(A)[1] set.seed(2) hyperA <- c(1, 1); hyperB <- c(0.5, .01) totalg <- 30 upost <- vpost <- array(0, c(totalg, n)) kpost <- array(NA, c(totalg, 2)); accept <- rep(NA, totalg) upost[1,] <- vpost[1,] <- rep(.001, 544); kpost[1,] <- c(10, 100) eta <- upost[1,] + vpost[1,] C <- exp(eta) * E; diagC <- diag.spam(c(rep(0, n), C)) b <- c( rep(0, n), Y + (eta - 1) * C) Qu <- R <- precmat.IGMRFirreglat(A); pad(Qu) <- c(2 * n, 2 * n) Qv <- as.spam(rbind(cbind( diag(n), -diag(n)), cbind(-diag(n), diag(n)))) Q <- kpost[1,1] * Qu + kpost[1,2] * Qv + diagC struct <- chol(Q, memory = list(nnzcolindices = 6467)) uRuHalf <- t(upost[1,]) %*% (R %*% upost[1,]) / 2 vvHalf <- t(vpost[1,]) %*% vpost[1,] / 2 postshape <- hyperA + c(n - 1, n) / 2 for (i in 2:totalg) { kpost[i,] <- rgamma(2, postshape, hyperB + c(uRuHalf, vvHalf)) etaTilde <- eta for(index in 1:2){ C <- E * exp(etaTilde) diagC <- diag.spam(c(rep(0, n), C)) b <- c(rep(0, 544), Y + (etaTilde - 1) * C) Q <- kpost[i,1] * Qu + kpost[i,2] * Qv + diagC etaTilde <- c(solve.spam(Q, b, Rstruct = struct))[1:n + n] } C <- exp(etaTilde) * E; diagC <- diag.spam(c(rep(0, n), C)) b <- c( rep(0, n), Y + (etaTilde - 1) * C) Q <- kpost[i,1] * Qu + kpost[i,2] * Qv + diagC x_ <- c(rmvnorm.canonical(1, b, Q, Rstruct = struct)) upost[i,] <- x_[1:n]; eta_ <- x_[1:n + n]; vpost[i,] <- eta_ - upost[i,] uRuHalf_ <- t(upost[i,]) %*% (R %*% upost[i,]) / 2 vvHalf_ <- t(vpost[i,]) %*% vpost[i,] / 2 etaTilde_ <- eta_ for(index in 1:2){ C_ <- E * exp(etaTilde_) diagC_ <- diag.spam(c(rep(0, n), C_)) b_ <- c(rep(0, 544), Y + (etaTilde_ - 1) * C_) Q_<- kpost[i,1] * Qu + kpost[i,2] * Qv + diagC_ etaTilde_ <- c(solve.spam(Q_, b_, Rstruct = struct))[1:n + n] } C_ <- exp(etaTilde_) * E; diagC_ <- diag.spam(c(rep(0, n), C_)) b_ <- c( rep(0, n), Y + (etaTilde_ - 1) * C_) Q_ <- kpost[i,1] * Qu + kpost[i,2] * Qv + diagC_ logPost_ <- sum(Y * eta_ - E * exp(eta_)) - kpost[i,1] * uRuHalf_ - kpost[i, 2] * vvHalf_ logPost <- sum(Y * eta - E * exp(eta)) - kpost[i,1] * uRuHalf - kpost[i,2] * vvHalf logApproxX_ <- - kpost[i,1] * uRuHalf_ - kpost[i,2] * vvHalf_ - sum(.5 * eta_^2 * C) + sum(b * eta_) logApproxX <- - kpost[i,1] * uRuHalf - kpost[i,2] * vvHalf - sum(.5 * eta^2 * C_) + sum(b_ * eta) logAlpha <- min(0, logPost_ - logPost + logApproxX - logApproxX_) if (log(runif(1)) < logAlpha) { uRuHalf <- uRuHalf_; vvHalf <- vvHalf_ eta <- eta_; b <- b_; C <- C_; accept[i] <- 1 } else{ accept[i] <- 0; upost[i,] <- upost[i-1,]; vpost[i,] <- vpost[i-1,]} } # values of 30th iteration head(eta) tail(b) head(C) tail(accept) tail(upost[30,]) tail(vpost[30,]) sum(accept[-1]) sum(upost) spam/tests/Examples/0000755000176200001440000000000014412751662014142 5ustar liggesusersspam/tests/Examples/spam-Ex.Rout.save0000644000176200001440000022505414515422420017263 0ustar liggesusers R Under development (unstable) (2023-10-04 r85267) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > pkgname <- "spam" > source(file.path(R.home("share"), "R", "examples-header.R")) > options(warn = 1) > library('spam') Spam version 2.10-0 (2023-10-23) is loaded. Type 'help( Spam)' or 'demo( spam)' for a short introduction and overview of this package. Help for individual functions is also obtained by adding the suffix '.spam' to the function name, e.g. 'help( chol.spam)'. Attaching package: ‘spam’ The following objects are masked from ‘package:base’: backsolve, forwardsolve > > base::assign(".oldSearch", base::search(), pos = 'CheckExEnv') > base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv') > cleanEx() > nameEx("Coercion") > ### * Coercion > > flush(stderr()); flush(stdout()) > > ### Name: Coercion > ### Title: Coercion to a Vector > ### Aliases: as.vector as.vector.spam as.vector,spam-method > ### as.vector,spam.chol.NgPeyton-method > ### Keywords: manip > > ### ** Examples > > x <- diag(2) > ifelse( x, x, 1-x) [,1] [,2] [1,] 1 1 [2,] 1 1 > ifelse( x, as.vector(x), 1-as.vector(x)) [,1] [,2] [1,] 1 1 [2,] 1 1 > > x <- diag.spam(2) > options(spam.structurebased=FALSE) > ifelse( x, as.vector(x), 1-as.vector(x)) [1] 1 1 1 1 > options(spam.structurebased=TRUE) > ifelse( x, as.vector(x), 1-as.vector(x)) [1] 1 1 > > > > cleanEx() > nameEx("Math") > ### * Math > > flush(stderr()); flush(stdout()) > > ### Name: Math > ### Title: Mathematical Functions > ### Aliases: Math Math.spam Math,spam-method ceiling.spam > ### ceiling,spam-method floor.spam floor,spam-method trunc.spam > ### trunc,spam-method exp.spam exp,spam-method log.spam log,spam-method > ### log2.spam log2,spam-method log10.spam log10,spam-method sqrt.spam > ### sqrt,spam-method gamma.spam gamma,spam-method digamma.spam > ### digamma,spam-method trigamma.spam trigamma,spam-method lgamma.spam > ### lgamma,spam-method abs.spam abs,spam-method cumprod.spam > ### cumprod,spam-method cumsum.spam cumsum,spam-method cummax.spam > ### cummax,spam-method cummin.spam cummin,spam-method cos.spam > ### cos,spam-method cosh.spam cosh,spam-method acos.spam acos,spam-method > ### acosh.spam acosh,spam-method sin.spam sin,spam-method asin.spam > ### asin,spam-method asinh.spam asinh,spam-method tan.spam > ### tan,spam-method atan.spam atan,spam-method atanh.spam > ### atanh,spam-method > ### Keywords: manip > > ### ** Examples > > getGroupMembers("Math") [1] "abs" "sign" "sqrt" "ceiling" "floor" "trunc" [7] "cummax" "cummin" "cumprod" "cumsum" "exp" "expm1" [13] "log" "log10" "log2" "log1p" "cos" "cosh" [19] "sin" "sinh" "tan" "tanh" "acos" "acosh" [25] "asin" "asinh" "atan" "atanh" "cospi" "sinpi" [31] "tanpi" "gamma" "lgamma" "digamma" "trigamma" > > mat <- matrix(c( 1,2,0,3,0,0,0,4,5),3) > smat <- as.spam( mat) > cos( mat) [,1] [,2] [,3] [1,] 0.5403023 -0.9899925 1.0000000 [2,] -0.4161468 1.0000000 -0.6536436 [3,] 1.0000000 1.0000000 0.2836622 > cos( smat) [,1] [,2] [,3] [1,] 0.5403023 -0.9899925 0.0000000 [2,] -0.4161468 0.0000000 -0.6536436 [3,] 0.0000000 0.0000000 0.2836622 Class 'spam' (32-bit) > > options(spam.structurebased=FALSE) > cos( smat) [,1] [,2] [,3] [1,] 0.5403023 -0.9899925 1.0000000 [2,] -0.4161468 1.0000000 -0.6536436 [3,] 1.0000000 1.0000000 0.2836622 Class 'spam' (32-bit) > > sqrt( smat) [,1] [,2] [,3] [1,] 1.000000 1.732051 0.000000 [2,] 1.414214 0.000000 2.000000 [3,] 0.000000 0.000000 2.236068 Class 'spam' (32-bit) > > > > cleanEx() > nameEx("Math2") > ### * Math2 > > flush(stderr()); flush(stdout()) > > ### Name: Math2 > ### Title: Rounding of Numbers > ### Aliases: Math2 Math2.spam Math2,spam-method Math2,spam,numeric-method > ### round,spam-method signif,spam-method round.spam signif.spam > ### Keywords: manip > > ### ** Examples > > getGroupMembers("Math2") [1] "round" "signif" > > smat <- diag.spam( rnorm(15)) > round(smat, 3) [1] -0.626 0.184 -0.836 1.595 0.330 -0.820 0.487 0.738 0.576 -0.305 [11] 1.512 0.390 -0.621 -2.215 1.125 Class 'spam' (32-bit) > > > > cleanEx() > nameEx("Summary") > ### * Summary > > flush(stderr()); flush(stdout()) > > ### Name: Summary > ### Title: Rounding of Numbers > ### Aliases: Summary Summary.spam Summary,spam-method all.spam any.spam > ### max.spam min.spam prod.spam range.spam sum.spam all,spam-method > ### any,spam-method max,spam-method min,spam-method prod,spam-method > ### range,spam-method sum,spam-method > ### Keywords: manip > > ### ** Examples > > getGroupMembers("Summary") [1] "max" "min" "range" "prod" "sum" "any" "all" > > smat <- diag.spam( runif(15)) > range(smat) [1] 0.0000000 0.9446753 > options(spam.structurebased=FALSE) > range(smat) [1] 0.0000000 0.9446753 > > ## Not run: > ##D max( log(spam(c(1,-1))), na.rm=TRUE) > ## End(Not run) > # allow 'NA's first: > # TODO > # options(spam.NAOK=TRUE) > # max( log(spam(c(1,-1))), na.rm=TRUE) > > > > cleanEx() > nameEx("UScounties") > ### * UScounties > > flush(stderr()); flush(stdout()) > > ### Name: UScounties > ### Title: Adjacency Structure of the Counties in the Contiguous United > ### States > ### Aliases: UScounties UScounties.storder UScounties.ndorder > ### Keywords: datasets > > ### ** Examples > > # number of counties: > n <- nrow( UScounties.storder) > > ## Not run: > ##D # make a precision matrix > ##D Q <- diag.spam( n) + .2 * UScounties.storder + .1 * UScounties.ndorder > ##D display( as.spam( chol( Q))) > ## End(Not run) > > > > cleanEx() > nameEx("USprecip") > ### * USprecip > > flush(stderr()); flush(stdout()) > > ### Name: USprecip > ### Title: Monthly Total Precipitation (mm) for April 1948 in the > ### Contiguous United States > ### Aliases: USprecip > ### Keywords: datasets > > ### ** Examples > > # plot > ## Not run: > ##D library(fields) > ##D > ##D data(USprecip) > ##D par(mfcol=c(2,1)) > ##D quilt.plot(USprecip[,1:2],USprecip[,3]) > ##D US( add=TRUE, col=2, lty=2) > ##D quilt.plot(USprecip[,1:2],USprecip[,4]) > ##D US( add=TRUE, col=2, lty=2) > ## End(Not run) > > > > cleanEx() > nameEx("adjacency") > ### * adjacency > > flush(stderr()); flush(stdout()) > > ### Name: adjacency > ### Title: Administrative Districts of Germany > ### Aliases: adjacency adjacency.spam adjacency.landkreis germany.graph > ### Keywords: hplot > > ### ** Examples > > ## Not run: > ##D loc <- system.file("demodata/germany.adjacency", package="spam") > ##D display( adjacency.landkreis( loc)) > ## End(Not run) > > > > cleanEx() > nameEx("allequal") > ### * allequal > > flush(stderr()); flush(stdout()) > > ### Name: allequal > ### Title: Test if Two Sparse Matrices are (Nearly) Equal > ### Aliases: all.equal.spam all.equal,matrix,spam-method > ### all.equal,spam,matrix-method all.equal,spam,spam-method > ### Keywords: array > > ### ** Examples > > obj <- diag.spam(2) > obj[1,2] <- .Machine$double.eps > > all.equal( diag.spam(2), obj) [1] "Lengths (2, 3) differ" > > all.equal( t(obj), obj) [1] "Column-sparsity structure differ (at least 1 instance(s))" [2] "Row-sparsity structure differ (at least 1 instance(s))" > > all.equal( t(obj), obj*1.1) [1] "Column-sparsity structure differ (at least 1 instance(s))" [2] "Row-sparsity structure differ (at least 1 instance(s))" [3] "Mean relative difference: 0.1" > > # We can compare a spam to a matrix > all.equal(diag(2),diag.spam(2)) [1] TRUE > > # the opposite does often not make sense, > # hence, it is not implemented. > all.equal(diag.spam(2),diag(2)) [1] TRUE > > > # A zero matrix contains one element: > str(spam(0)) Formal class 'spam' [package "spam"] with 4 slots ..@ entries : num 0 ..@ colindices : int 1 ..@ rowpointers: int [1:2] 1 2 ..@ dimension : int [1:2] 1 1 > # hence > all.equal.spam(spam(0,3,3), diag.spam(0,3) ) [1] "Lengths (1, 3) differ" > norm(spam(0,3,3) - diag.spam(0,3) ) [1] 0 > > > > cleanEx() > nameEx("apply") > ### * apply > > flush(stderr()); flush(stdout()) > > ### Name: apply > ### Title: Apply Functions Over Sparse Matrix Margins > ### Aliases: apply.spam > ### Keywords: array algebra > > ### ** Examples > > S <- as.spam(dist(1:5)) > S <- apply.spam(S/2, NULL, exp) > # instead of > # S@entries <- exp( S@entries/2) > > # Technical detail, a null matrix consists > # of one zero element. > apply.spam(S,c(1,2),pmax) [,1] [,2] [,3] [,4] [,5] [1,] 0.000000 0.000000 0.000000 0.000000 0 [2,] 1.648721 0.000000 0.000000 0.000000 0 [3,] 2.718282 1.648721 0.000000 0.000000 0 [4,] 4.481689 2.718282 1.648721 0.000000 0 [5,] 7.389056 4.481689 2.718282 1.648721 0 Class 'spam' (32-bit) > apply.spam(S,1,range) [,1] [,2] [,3] [,4] [,5] [1,] 0 1.648721 1.648721 1.648721 1.648721 [2,] 0 1.648721 2.718282 4.481689 7.389056 > > > # A similar example as for the base apply. > # However, no dimnames else we would get warnings. > x <- as.spam(cbind(x1 = 3, x2 = c(0,0,0, 5:2))) > apply.spam(x, 2, mean, trim = .2) [1] 3.0 3.5 > col.sums <- apply.spam(x, 2, sum) > row.sums <- apply.spam(x, 1, sum) > rbind(cbind(x, row.sums), c(col.sums, sum(col.sums))) [,1] [,2] [,3] [1,] 3 0 3 [2,] 3 0 3 [3,] 3 0 3 [4,] 3 5 8 [5,] 3 4 7 [6,] 3 3 6 [7,] 3 2 5 [8,] 21 14 35 Class 'spam' (32-bit) > > apply.spam(x, 2, is.vector) [1] TRUE TRUE > > # Sort the columns of a matrix > # Notice that the result is a list due to the different > # lengths induced by the nonzero elements > apply.spam(x, 2, sort) [[1]] [1] 3 3 3 3 3 3 3 [[2]] [1] 2 3 4 5 > > # Function with extra args: > cave <- function(x, c1, c2) c(mean(x[c1]), mean(x[c2])) > apply(x,1, cave, c1=1, c2=c(1,2)) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 3.0 3.0 3.0 3 3.0 3 3.0 [2,] 1.5 1.5 1.5 4 3.5 3 2.5 > > ma <- spam(c(1:4, 0, 0,0, 6), nrow = 2) > ma [,1] [,2] [,3] [,4] [1,] 1 3 0 0 [2,] 2 4 0 6 Class 'spam' (32-bit) > apply.spam(ma, 1, table) #--> a list of length 2 [[1]] 1 3 1 1 [[2]] 2 4 6 1 1 1 > apply.spam(ma, 1, stats::quantile)# 5 x n matrix with rownames [,1] [,2] 0% 1.0 2 25% 1.5 3 50% 2.0 4 75% 2.5 5 100% 3.0 6 > > > > cleanEx() > nameEx("bandwidth") > ### * bandwidth > > flush(stderr()); flush(stdout()) > > ### Name: bandwidth > ### Title: Bandwidth of a Sparse Matrix > ### Aliases: bandwidth > ### Keywords: array algebra > > ### ** Examples > > bandwidth(spam(c(0, 1), 3, 2)) [1] 1 1 > > bandwidth(spam(c(0, 0, 1, rep(0, 9)), 4, 3)) [1] 2 -2 > > > > > cleanEx() > nameEx("bdiag") > ### * bdiag > > flush(stderr()); flush(stdout()) > > ### Name: bdiag > ### Title: Binds Arrays Corner-to-Corner > ### Aliases: bdiag bdiag.spam > ### Keywords: array algebra > > ### ** Examples > > A <- diag.spam(2, 4) # 2*I4 > B <- matrix(1,3,3) > AB <- bdiag.spam(A,B) > > # equivalent to: > ABalt <- rbind(cbind( A, matrix(0,nrow(A),ncol(B))), + cbind( matrix(0,nrow(B),ncol(A)), B)) > > norm(AB-ABalt) [1] 0 > > > # Matrices do not need to be square: > bdiag.spam(1,2:5,6) [,1] [,2] [,3] [1,] 1 0 0 [2,] 0 2 0 [3,] 0 3 0 [4,] 0 4 0 [5,] 0 5 0 [6,] 0 0 6 Class 'spam' (32-bit) > > > > cleanEx() > nameEx("cbind") > ### * cbind > > flush(stderr()); flush(stdout()) > > ### Name: cbind > ### Title: Combine Sparse Matrices by Rows or Columns > ### Aliases: cbind.spam rbind.spam cbind rbind cbind,spam-method > ### rbind,spam-method > ### Keywords: array manip > > ### ** Examples > > x <- cbind.spam(1:5,6) > > y <- cbind(x, 7) > > rbind( x, x) [,1] [,2] [1,] 1 6 [2,] 2 6 [3,] 3 6 [4,] 4 6 [5,] 5 6 [6,] 1 6 [7,] 2 6 [8,] 3 6 [9,] 4 6 [10,] 5 6 Class 'spam' (32-bit) > # for some large matrices t( cbind( t(x), t(x))) > # might be slightly faster: > > > > > > cleanEx() > nameEx("chol") > ### * chol > > flush(stderr()); flush(stdout()) > > ### Name: chol > ### Title: Cholesky Factorization for Sparse Matrices > ### Aliases: chol chol.spam chol,ANY-method chol,matrix-method > ### chol,spam-method update.spam update,spam.chol.NgPeyton-method > ### update.spam.chol.NgPeyton > ### Keywords: algebra > > ### ** Examples > > # generate multivariate normals: > set.seed(13) > n <- 25 # dimension > N <- 1000 # sample size > Sigma <- .25^abs(outer(1:n,1:n,"-")) > Sigma <- as.spam( Sigma, eps=1e-4) > > cholS <- chol( Sigma) > # cholS is the upper triangular part of the permutated matrix Sigma > iord <- ordering(cholS, inv=TRUE) > > R <- as.spam(cholS) > mvsample <- ( array(rnorm(N*n),c(N,n)) %*% R)[,iord] > # It is often better to order the sample than the matrix > # R itself. > > # 'mvsample' is of class 'spam'. We need to transform it to a > # regular matrix, as there is no method 'var' for 'spam' (should there?). > norm( var( as.matrix( mvsample)) - Sigma, type='m') [1] 0.1119671 > norm( t(R) %*% R - Sigma) [1] 0.6665039 > > > # To speed up factorizations, memory allocations can be optimized: > opt <- summary(cholS) > # here, some elements of Sigma may be changed... > cholS <- chol( Sigma, memory=list(nnzR=opt$nnzR,nnzcolindices=opt$nnzc)) > > > > > cleanEx() > nameEx("circulant") > ### * circulant > > flush(stderr()); flush(stdout()) > > ### Name: circulant > ### Title: Create Circulant Matrices > ### Aliases: circulant.spam > ### Keywords: array algebra > > ### ** Examples > > circulant.spam(c(1,.25,0,0,0)) [,1] [,2] [,3] [,4] [,5] [1,] 1.00 0.25 0.00 0.00 0.00 [2,] 0.00 1.00 0.25 0.00 0.00 [3,] 0.00 0.00 1.00 0.25 0.00 [4,] 0.00 0.00 0.00 1.00 0.25 [5,] 0.25 0.00 0.00 0.00 1.00 Class 'spam' (32-bit) > > > > cleanEx() > nameEx("cleanup") > ### * cleanup > > flush(stderr()); flush(stdout()) > > ### Name: cleanup > ### Title: Cleaning up sparse matrices > ### Aliases: cleanup > ### Keywords: algebra > > ### ** Examples > > A <- diag.spam(2) > A[1,2] <- 0 > > all.equal(A, t(A)) [1] "Column-sparsity structure differ (at least 1 instance(s))" [2] "Row-sparsity structure differ (at least 1 instance(s))" > isSymmetric.spam(A) [1] TRUE > all.equal(cleanup(A), diag.spam(2)) [1] TRUE > > > > cleanEx() > nameEx("coerce-methods") > ### * coerce-methods > > flush(stderr()); flush(stdout()) > > ### Name: coerce-methods > ### Title: Force a 'spam' Object to Belong to a Class > ### Aliases: coerce.spam coerce,spam,logical-method > ### coerce,spam,matrix-method coerce,spam,vector-method > ### coerce,spam,list-method coerce,spam,integer-method > ### Keywords: methods > > ### ** Examples > > ifelse( diag.spam(2)*c(0,1), TRUE, FALSE) [1] FALSE FALSE FALSE TRUE > > > > cleanEx() > nameEx("constructors") > ### * constructors > > flush(stderr()); flush(stdout()) > > ### Name: constructors > ### Title: Slot Modification > ### Aliases: rowpointers rowpointers<- colindices colindices<- entries > ### entries<- dimension<- constructors > ### Keywords: array > > ### ** Examples > > x <- diag.spam( 2) > rowpointers( x) <- c(1,1,3) > > # The last line is equivalent to > x@rowpointers <- as.integer( c(1,1,3)) > > > > cleanEx() > nameEx("covmat") > ### * covmat > > flush(stderr()); flush(stdout()) > > ### Name: covmat > ### Title: Covariance Functions > ### Aliases: covmat cov.exp cov.sph cor.sph cov.nug cov.wu1 cov.wu2 cov.wu3 > ### cov.wend1 cov.wend2 cov.mat cov.mat12 cov.mat32 cov.mat52 cov.finnmat > ### Keywords: algebra > > ### ** Examples > > set.seed(123) > n <- 200 > locs <- cbind(runif(n),runif(n)) > h <- nearest.dist(locs, delta=sqrt(2), upper = NULL) > Sigma <- cov.sph(h, c(.3, 1, .1)) > > iidsample <- rnorm(n) > cholS <- chol.spam(as.spam(Sigma)) > iorder <- iord <- ordering(cholS, inv = TRUE) > sample <- (iidsample %*% as.spam(cholS))[iorder] > plot(locs, col = fields::tim.colors(n = 256)[cut(sample, n)], pch = 20) > > ## Not run: > ##D h <- seq(0, to=1, length.out=100) > ##D plot( h, cov.exp(h, c(1/3,1)), type='l', ylim=c(0,1)) > ##D type <- c("sph","wendland1","wendland2","wu1","wu2","wu3") > ##D for (i in 1:6) > ##D lines( h, covmat(h, 1, type=type[i]), col=i+1) > ##D legend('topright',legend=type, col=2:7, lty=1) > ##D > ## End(Not run) > > > > cleanEx() > nameEx("crossprod") > ### * crossprod > > flush(stderr()); flush(stdout()) > > ### Name: crossprod > ### Title: Spam Matrix Crossproduct > ### Aliases: crossprod.default crossprod.spam tcrossprod.spam > ### crossprod,spam,missing-method tcrossprod,spam,missing-method > ### crossprod,ANY,spam-method tcrossprod,ANY,spam-method > ### crossprod,spam,spam-method tcrossprod,spam,spam-method > ### crossprod,spam,ANY-method tcrossprod,spam,ANY-method > ### Keywords: array algebra > > ### ** Examples > > crossprod.spam(diag.spam(2),1:2) [,1] [1,] 1 [2,] 2 > > > > > cleanEx() > nameEx("det") > ### * det > > flush(stderr()); flush(stdout()) > > ### Name: det > ### Title: Determinant of a Symmetric Positive Definite Sparse Matrix > ### Aliases: det,spam-method det,spam.chol.NgPeyton-method det.spam det > ### determinant determinant,spam-method determinant.spam > ### determinant.spam.chol determinant.spam.chol.NgPeyton > ### Keywords: array algebra > > ### ** Examples > > x <- spam( c(4,3,0,3,5,1,0,1,4), 3) > det( x) [1] 40 > determinant( x) $modulus [1] 3.688879 attr(,"logarithm") [1] TRUE $sign [1] 1 attr(,"class") [1] "det" > > det( chol( x)) [1] 6.324555 > > > > cleanEx() > nameEx("diag") > ### * diag > > flush(stderr()); flush(stdout()) > > ### Name: diag > ### Title: Sparse Matrix diagonals > ### Aliases: diag diag.of.spam diag.spam spam_diag diag,spam-method > ### diag,ANY-method diag<- diag<-,ANY-method diag<-,spam-method > ### diag<-.spam diag.spam<- diag.assign,spam-method > ### Keywords: array algebra > > ### ** Examples > > diag.spam(2, 4) # 2*I4 [,1] [,2] [,3] [,4] [1,] 2 0 0 0 [2,] 0 2 0 0 [3,] 0 0 2 0 [4,] 0 0 0 2 Class 'spam' (32-bit) > smat <- diag.spam(1:5) > diag( smat) [1] 1 2 3 4 5 > diag( smat) <- 5:1 > > # The last line is equivalent to > diag.spam( smat) <- 5:1 > > # Note that diag.spam( 1:5) <- 5:1 not work of course. > > > > > > cleanEx() > nameEx("diff") > ### * diff > > flush(stderr()); flush(stdout()) > > ### Name: diff > ### Title: Lagged Differences > ### Aliases: diff diff.spam diff,spam-method > ### Keywords: array manip > > ### ** Examples > > # incidence matrix for a RW(3) model > D <- diff.spam(diag.spam(10), lag=1, differences=3) > t(D)%*%D [1] 1 -3 3 -1 -3 10 -12 6 -1 3 -12 19 -15 6 -1 -1 6 -15 20 [20] -15 6 -1 -1 6 -15 20 -15 6 -1 -1 6 -15 20 -15 6 -1 -1 6 [39] -15 20 -15 6 -1 -1 6 -15 19 -12 3 -1 6 -12 10 -3 -1 3 -3 [58] 1 Class 'spam' (32-bit) > > > > cleanEx() > nameEx("dim") > ### * dim > > flush(stderr()); flush(stdout()) > > ### Name: dim > ### Title: Dimensions of an Object > ### Aliases: dim.spam dim<-.spam dim<-,spam-method > ### Keywords: array > > ### ** Examples > > x <- diag(4) > dim(x)<-c(2,8) > x [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1 0 0 0 0 1 0 0 [2,] 0 0 1 0 0 0 0 1 > > s <- diag.spam(4) > dim(s) <- c(2,8) # result is different than x > > s <- diag.spam(4) > pad(s) <- c(7,3) # any positive value can be used > > > > > cleanEx() > nameEx("display") > ### * display > > flush(stderr()); flush(stdout()) > > ### Name: display > ### Title: Graphially Represent the Nonzero Entries > ### Aliases: display display.spam display,spam-method > ### Keywords: hplot > > ### ** Examples > > set.seed(13) > > smat <- spam_random(8) > par(mfcol=c(1,2), pty='s') > options(spam.imagesize = 1000) > display(smat) > options(spam.imagesize = 10) > display(smat, cex=.25) > > > # very large but very sparse matrix > smat <- spam_random(2^14, distribution=rnorm, density=1e-5, verbose=TRUE) Density is 1.04e-05, specified is 1e-05 (nnz=2798). > par(mfcol=c(1, 1), mai=c(.4,.4,.1,.1), pty='s') > display(smat) Warning: default value for 'cex' in 'display' might not be the optimal choice > > > > graphics::par(get("par.postscript", pos = 'CheckExEnv')) > cleanEx() > nameEx("eigen") > ### * eigen > > flush(stderr()); flush(stdout()) > > ### Name: eigen > ### Title: Eigenvalues for Sparse Matrices > ### Aliases: eigen.spam eigen_approx > ### Keywords: algebra > > ### ** Examples > > set.seed(81) > rspam <- spam_random(42^2, density = .0001, spd = TRUE) > SPD <- eigen.spam(rspam, nev = 18, control = list(mode = "SM"), + only.values = TRUE) > > any(SPD$values <= 0, na.rm = TRUE) [1] FALSE > isSymmetric(rspam) [1] TRUE > # hence the matrix is symmetric positiv definit > > rspam2 <- spam_random(50^2, density = .0001, spd = FALSE, sym = TRUE, + distribution = rpois, lambda = 2) > SNPD <- eigen.spam(rspam2, nev = 18, control = list(mode = "SM"), + only.values = TRUE) > > any(SNPD$values <= 0, na.rm = TRUE) [1] TRUE > isSymmetric(rspam2) [1] TRUE > # hence the matrix is symmetric but not positiv definit > > > > cleanEx() > nameEx("fields-wrapper") > ### * fields-wrapper > > flush(stderr()); flush(stdout()) > > ### Name: fields-wrapper > ### Title: Wrapper for Distance Matrix Computation > ### Aliases: spam_rdist rdist.dist spam_rdist.earth > ### Keywords: array > > ### ** Examples > > ## Not run: > ##D require(fields) > ##D look <- mKrig(x,Y, Covariance="Wendland", dimension=2, k=1, > ##D cov.args=list( Distance='spam_rdist')) > ## End(Not run) > > > > > cleanEx() > nameEx("foreign") > ### * foreign > > flush(stderr()); flush(stdout()) > > ### Name: foreign > ### Title: Transformation to Other Sparse Formats > ### Aliases: foreign as.spam.matrix.csr as.dgRMatrix.spam as.dgCMatrix.spam > ### as.spam.dgRMatrix as.spam.dgCMatrix > ### Keywords: array manip > > ### ** Examples > > > ## Not run: > ##D S <- diag.spam(4) > ##D R <- as.dgRMatrix.spam( S) > ##D C <- as.dgCMatrix.spam( S) > ##D as.spam.dgCMatrix(C) > ##D slotNames(C) > ##D slotNames(R) > ##D # For column oriented sparse formats a transpose does not the job, > ##D # as the slot names change. > ##D > ##D > ##D # as.spam(R) does not work. > ## End(Not run) > > ## Not run: > ##D # for transformations between SparseM and spam: > ##D > ##D as.matrix.csr.spam <- function(x,...) { > ##D if (new("matrix.csr")) { > ##D newx <- new("matrix.csr") > ##D slot(newx,"ra",check=FALSE) <- x@entries > ##D slot(newx,"ja",check=FALSE) <- x@colindices > ##D slot(newx,"ia",check=FALSE) <- x@rowpointers > ##D slot(newx,"dimension",check=FALSE) <- x@dimension > ##D return(newx) > ##D } > ##D stop("function requires 'SparseM' package") > ##D } > ##D # then with `SparseM`: as.matrix.csr.spam( spamobject ) > ## End(Not run) > > ## Not run: > ##D # a dataset contained in Matrix > ##D data(KNex, package='Matrix') > ##D summary( KN <- as.spam.dgCMatrix(KNex$mm) ) > ##D > ## End(Not run) > > > > cleanEx() > nameEx("germany.plot") > ### * germany.plot > > flush(stderr()); flush(stdout()) > > ### Name: germany.plot > ### Title: Plot Administrative Districts of Germany > ### Aliases: germany.plot > ### Keywords: hplot > > ### ** Examples > > data( Oral) > germany.plot( Oral$Y/Oral$E) > > > # Plot the Bundeslaender: > germany.plot(germany.info$id%/%1000,col=rep(2:8,3), legend=FALSE) > > > > cleanEx() > nameEx("germanydata") > ### * germanydata > > flush(stderr()); flush(stdout()) > > ### Name: germany.data > ### Title: Meta-data About Administrative Districts of Germany > ### Aliases: germany.data germany.info germany.poly germany.spam germany > ### Keywords: hplot > > ### ** Examples > > # Plot the Bundeslaender: > germany.plot(germany.info$id%/%1000,col=rep(2:8,3), legend=FALSE) > > > > cleanEx() > nameEx("gmult") > ### * gmult > > flush(stderr()); flush(stdout()) > > ### Name: gmult > ### Title: Generalized Multiplication > ### Aliases: gmult > ### Keywords: array algebra > > ### ** Examples > > x <- spam(1, 15, 15) > print(x, minimal = FALSE) Matrix of dimension 15x15 with (row-wise) nonzero elements: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 --------------------------------------------- 1| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 5| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 6| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 7| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 8| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 9| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 10| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 12| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 13| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 14| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 15| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 class: spam (32-bit) Class 'spam' (32-bit) > > splits <- c(1,2,8,ncol(x)+1) # divide matrix into 9 submatrices > fact <- array(1:9, c(3,3)) # multiply each submatrix with a different factor > oF <- gmult(x, splits, fact) > print(oF, minimal = FALSE) Matrix of dimension 15x15 with (row-wise) nonzero elements: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 --------------------------------------------- 1| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 1 4 4 4 4 4 4 7 7 7 7 7 7 7 7 2| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 2 5 5 5 5 5 5 8 8 8 8 8 8 8 8 3| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 2 5 5 5 5 5 5 8 8 8 8 8 8 8 8 4| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 2 5 5 5 5 5 5 8 8 8 8 8 8 8 8 5| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 2 5 5 5 5 5 5 8 8 8 8 8 8 8 8 6| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 2 5 5 5 5 5 5 8 8 8 8 8 8 8 8 7| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 2 5 5 5 5 5 5 8 8 8 8 8 8 8 8 8| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 3 6 6 6 6 6 6 9 9 9 9 9 9 9 9 9| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 3 6 6 6 6 6 6 9 9 9 9 9 9 9 9 10| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 3 6 6 6 6 6 6 9 9 9 9 9 9 9 9 11| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 3 6 6 6 6 6 6 9 9 9 9 9 9 9 9 12| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 3 6 6 6 6 6 6 9 9 9 9 9 9 9 9 13| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 3 6 6 6 6 6 6 9 9 9 9 9 9 9 9 14| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 3 6 6 6 6 6 6 9 9 9 9 9 9 9 9 15| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 3 6 6 6 6 6 6 9 9 9 9 9 9 9 9 class: spam (32-bit) Class 'spam' (32-bit) > > > > cleanEx() > nameEx("grid_trace2") > ### * grid_trace2 > > flush(stderr()); flush(stdout()) > > ### Name: grid_trace2 > ### Title: Two trace plots and a scatter plot. > ### Aliases: grid_trace2 > ### Keywords: plot trace plot grid > > ### ** Examples > > grid_trace2(runif(500), runif(500), + chain1_yaxis_at = seq(.2, 1, by = .2), + chain1_lab = "chain1", chain2_lab = "chain2", + main = "Uniform", + lwd_lines = grid::unit(.5, "mm")) > > > > cleanEx() > nameEx("grid_zoom") > ### * grid_zoom > > flush(stderr()); flush(stdout()) > > ### Name: grid_zoom > ### Title: grid_zoom > ### Aliases: grid_zoom > ### Keywords: zoom_grid zoom plot grid > > ### ** Examples > > require(grid) Loading required package: grid > ## -- Example 1 -- > set.seed(133) > grid_zoom(inputGrob = pointsGrob(runif(200), runif(200)), + inputViewport = viewport(name = 'main'), + zoom_xlim = c(.2, .3), zoom_ylim = c(.2, .3)) > > > ## -- Example 2 -- > ## initial plot > grid.newpage() > vp <- viewport(width=.8, height=.8, clip='on') > gt <- gTree(children=gList(polylineGrob(x=c((0:4)/10, rep(.5, 5), (10:6)/10, rep(.5, 5)), + y=c(rep(.5, 5), (10:6/10), rep(.5, 5), (0:4)/10), + id=rep(1:5, 4), default.units='native', + gp=gpar(col=1:5, lwd=3)), + pointsGrob(runif(1000), runif(1000),pch='.', gp=gpar(cex=3)), + rectGrob(gp=gpar(lwd=3)))) > pushViewport(vp) > grid.draw(gt) > > ## plot with zoom window > grid.newpage() > grid_zoom(inputGrob = gt, + inputViewport = vp, + x='topright', zoom_xlim=c(.6,.73), zoom_ylim=c(.3,.43),ratio=.4, + zoom_xaxis = NULL, zoom_gp = gpar(cex=3)) > > > > cleanEx() detaching ‘package:grid’ > nameEx("head") > ### * head > > flush(stderr()); flush(stdout()) > > ### Name: head > ### Title: Return the First or Last Part of an Object > ### Aliases: head.spam head,spam-method head,spam.chol.NgPeyton-method > ### tail.spam tail,spam-method tail,spam.chol.NgPeyton-method > ### Keywords: manip > > ### ** Examples > > head( precmat.RW2( 10)) [,1] [,2] [,3] [,4] [,5] [,6] [1,] 1 -2 1 0 0 0 [2,] -2 5 -4 1 0 0 [3,] 1 -4 6 -4 1 0 [4,] 0 1 -4 6 -4 1 [5,] 0 0 1 -4 6 -4 [6,] 0 0 0 1 -4 6 > tail( precmat.season(n=10, season=3), n=4, m=10) [,7] [,8] [,9] [,10] [7,] 3 2 1 0 [8,] 2 3 2 1 [9,] 1 2 2 1 [10,] 0 1 1 1 > > > > cleanEx() > nameEx("image") > ### * image > > flush(stderr()); flush(stdout()) > > ### Name: image > ### Title: Display a Sparse Matrix as Color Image > ### Aliases: image image.spam image.spam.chol image,spam-method > ### Keywords: hplot > > ### ** Examples > > set.seed(13) > > smat <- spam_random(8) > > par(mfcol=c(1,2),pty='s') > options(spam.imagesize=1000) > image(smat) # or use better color schemes > options(spam.imagesize=10) > image(smat, cex=.25) > > smat <- spam_random(2^14, distribution=rnorm, density=1e-5, verbose=TRUE) Density is 1.04e-05, specified is 1e-05 (nnz=2798). > par(mfcol=c(1,1), mai=c(.4,.4,.1,.1), pty='s') > image(smat) > > > > > graphics::par(get("par.postscript", pos = 'CheckExEnv')) > cleanEx() > nameEx("import") > ### * import > > flush(stderr()); flush(stdout()) > > ### Name: import > ### Title: Read External Matrix Formats > ### Aliases: import read.MM read.HB > ### Keywords: IO array algebra > > ### ** Examples > > > ## Not run: > ##D image(read.MM(gzcon(url( > ##D "ftp://math.nist.gov/pub/MatrixMarket2/Harwell-Boeing/bcspwr/bcspwr01.mtx.gz")))) > ## End(Not run) > > ## Not run: > ##D ## Datasets supplied within Matrix > ##D str(read.MM(system.file("external/pores_1.mtx",package = "Matrix"))) > ##D str(read.HB(system.file("external/utm300.rua", package = "Matrix"))) > ##D str(read.MM(system.file("external/lund_a.mtx", package = "Matrix"))) > ##D str(read.HB(system.file("external/lund_a.rsa", package = "Matrix"))) > ## End(Not run) > > > > cleanEx() > nameEx("isSymmetric") > ### * isSymmetric > > flush(stderr()); flush(stdout()) > > ### Name: isSymmetric > ### Title: Test if a Sparse Matrix is Symmetric > ### Aliases: isSymmetric.spam isSymmetric,spam-method > ### Keywords: array > > ### ** Examples > > obj <- diag.spam(2) > isSymmetric(obj) [1] TRUE > > obj[1,2] <- .Machine$double.eps > isSymmetric(obj) [1] TRUE > all.equal(obj, t(obj)) [1] "Column-sparsity structure differ (at least 1 instance(s))" [2] "Row-sparsity structure differ (at least 1 instance(s))" > > > > cleanEx() > nameEx("kronecker") > ### * kronecker > > flush(stderr()); flush(stdout()) > > ### Name: kronecker > ### Title: Kronecker Products on Sparse Matrices > ### Aliases: kronecker.default kronecker.spam kronecker,spam,ANY-method > ### kronecker,ANY,spam-method kronecker,spam,spam-method > ### Keywords: array algebra > > ### ** Examples > > # Starting with non-spam objects, we get a spam matrix > kronecker.spam( diag(2), array(1:4, c(2, 2))) [,1] [,2] [,3] [,4] [1,] 1 3 0 0 [2,] 2 4 0 0 [3,] 0 0 1 3 [4,] 0 0 2 4 Class 'spam' (32-bit) > > kronecker( diag.spam(2), array(1:4, c(2, 2))) [,1] [,2] [,3] [,4] [1,] 1 3 0 0 [2,] 2 4 0 0 [3,] 0 0 1 3 [4,] 0 0 2 4 Class 'spam' (32-bit) > > # Notice the preservation of sparsity structure: > kronecker( diag.spam(2), array(1:4, c(2, 2)), FUN="+") Warning: Sparseness structure of 'kronecker(X,Y)' preseved when applying 'FUN'. [,1] [,2] [,3] [,4] [1,] 2 4 0 0 [2,] 3 5 0 0 [3,] 0 0 2 4 [4,] 0 0 3 5 Class 'spam' (32-bit) > > > > > > cleanEx() > nameEx("landkreis") > ### * landkreis > > flush(stderr()); flush(stdout()) > > ### Name: map.landkreis > ### Title: Administrative districts of Germany > ### Aliases: map.landkreis > ### Keywords: hplot > > ### ** Examples > > ## Not run: > ##D data( Oral) > ##D par( mfcol=c(1,2)) > ##D germany.plot( log( Oral$Y), legend=TRUE) > ##D map.landkreis( log( Oral$Y)) > ## End(Not run) > > > > cleanEx() > nameEx("large_matrix") > ### * large_matrix > > flush(stderr()); flush(stdout()) > > ### Name: large_matrix > ### Title: Large 64-bit matrices require the R package 'spam64' > ### Aliases: large_matrix 'large matrix' large_matries 'large matries' > ### 64bit 64bits 'long vector' 'long vectors' spam64 > ### Keywords: array algebra > > ### ** Examples > > ## Not run: > ##D ## the following matrices are very large, and hence, > ##D ## require much memory and cpu time. > ##D library("spam64") > ##D s1 <- spam(1, ncol=2^30) # 32-bit matrix > ##D s1 > ##D > ##D s2 <- cbind(s1, s1) # 64-bit matrix > ##D s2 > ##D > ##D s3 <- spam(1, ncol=2^31) # 64-bit matrix > ##D s3 > ## End(Not run) > > > > cleanEx() > nameEx("lower.tri") > ### * lower.tri > > flush(stderr()); flush(stdout()) > > ### Name: lower.tri > ### Title: Lower and Upper Triangular Part of a Sparse Matrix > ### Aliases: lower.tri upper.tri lower.tri.spam upper.tri.spam > ### Keywords: array algebra > > ### ** Examples > > smat <- spam( c( 1,2,0,3,0,0,0,4,5),3) > upper.tri( smat) [,1] [,2] [,3] [1,] 0 1 0 [2,] 0 0 1 [3,] 0 0 0 Class 'spam' (32-bit) > upper.tri( smat, diag=TRUE) [,1] [,2] [,3] [1,] 1 1 0 [2,] 0 0 1 [3,] 0 0 1 Class 'spam' (32-bit) > > options(spam.trivalues=TRUE) > upper.tri( smat) [,1] [,2] [,3] [1,] 0 3 0 [2,] 0 0 4 [3,] 0 0 0 Class 'spam' (32-bit) > > > > > cleanEx() > nameEx("makeprec") > ### * makeprec > > flush(stderr()); flush(stdout()) > > ### Name: makeprec > ### Title: Create Precision Matrices > ### Aliases: precmat.GMRFreglat > ### Keywords: array algebra > > ### ** Examples > > as.matrix(precmat.GMRFre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are equivalent: > cleanup( precmat.IGMRFreglat(3,4) - + precmat.GMRFreglat(3,4,1, 'm1p1')) [1] 1 2 1 2 3 2 2 3 2 1 2 1 Class 'spam' (32-bit) > > > > > cleanEx() > nameEx("mle") > ### * mle > > flush(stderr()); flush(stdout()) > > ### Name: mle > ### Title: Maximum likelihood estimates > ### Aliases: neg2loglikelihood.spam neg2loglikelihood.nomean mle.spam > ### mle.nomean.spam neg2loglikelihood mle mle.nomean > ### Keywords: algebra > > ### ** Examples > > # True parameter values: > truebeta <- c(1,2,.2) # beta = (intercept, linear in x, linear in y) > truetheta <- c(.5,2,.02) # theta = (range, sill, nugget) > > > > # We now define a grid, distance matrix, and a sample: > x <- seq(0,1,l=5) > locs <- expand.grid( x, x) > X <- as.matrix( cbind(1,locs)) # design matrix > > distmat <- nearest.dist( locs, upper=NULL) # distance matrix > Sigma <- cov.sph( distmat, truetheta) # true covariance matrix > > > set.seed(15) > y <- c(rmvnorm.spam(1,X %*% truebeta,Sigma)) # construct sample > > # Here is the negative 2 log likelihood: > neg2loglikelihood.spam( y, X, distmat, cov.sph, + truebeta, truetheta) [1] 79.26271 > > # We pass now to the mle: > res <- mle.spam(y, X, distmat, cov.sph, + truebeta, truetheta,thetalower=c(0,0,0),thetaupper=c(1,Inf,Inf)) > > # Similar parameter estimates here, of course: > mle.nomean.spam(y-X%*%res$par[1:3], distmat, cov.sph, + truetheta, thetalower=c(0,0,0), thetaupper=c(1,Inf,Inf)) $par [1] 0.8057742 1.6038407 0.1376179 $value [1] 73.76311 $counts function gradient 15 15 $convergence [1] 0 $message [1] "CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH" > > > > cleanEx() > nameEx("nearestdist") > ### * nearestdist > > flush(stderr()); flush(stdout()) > > ### Name: nearestdist > ### Title: Distance Matrix Computation > ### Aliases: dist.spam nearest.dist distance > ### Keywords: array algebra > > ### ** Examples > > # Note that upper=T and using t(X)+X is quicker than upper=NULL; > # upper=T marginally slower than upper=F. > > # To compare nearest.dist with dist, use as.dist(...) > nx <- 4 > x <- expand.grid(as.double(1:nx),as.double(1:nx)) > sum( ( as.dist(nearest.dist( x, delta=nx*2))- + dist(x) )^2) [1] 0 > > # Create nearest neighbor structures: > par(mfcol=c(1,2)) > x <- expand.grid(1:nx,1:(2*nx)) > display( nearest.dist( x, delta=1)) Warning: default value for 'cex' in 'display' might not be the optimal choice > x <- expand.grid(1:(2*nx),1:nx) > display( nearest.dist( x, delta=1)) Warning: default value for 'cex' in 'display' might not be the optimal choice > > > > > graphics::par(get("par.postscript", pos = 'CheckExEnv')) > cleanEx() > nameEx("options") > ### * options > > flush(stderr()); flush(stdout()) > > ### Name: options > ### Title: Options Settings > ### Aliases: spam.options options.spam getOption.spam > ### Keywords: IO environment error print > > ### ** Examples > > smat <- diag.spam( 1:8) > smat [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1 0 0 0 0 0 0 0 [2,] 0 2 0 0 0 0 0 0 [3,] 0 0 3 0 0 0 0 0 [4,] 0 0 0 4 0 0 0 0 [5,] 0 0 0 0 5 0 0 0 [6,] 0 0 0 0 0 6 0 0 [7,] 0 0 0 0 0 0 7 0 [8,] 0 0 0 0 0 0 0 8 Class 'spam' (32-bit) > options(spam.printsize=49) > smat [1] 1 2 3 4 5 6 7 8 Class 'spam' (32-bit) > > # List all spam options: > options()[grep("spam",names(options()))] $spam.NAOK [1] FALSE $spam.cex [1] 1200 $spam.cholincreasefactor [1] 1.25 1.25 $spam.cholpivotcheck [1] TRUE $spam.cholsymmetrycheck [1] TRUE $spam.cholupdatesingular [1] "warning" $spam.dopivoting [1] TRUE $spam.drop [1] FALSE $spam.eps [1] 2.220446e-16 $spam.force64 [1] FALSE $spam.imagesize [1] 10 $spam.inefficiencywarning [1] 1e+06 $spam.listmethod [1] "PE" $spam.nearestdistincreasefactor [1] 1.3 $spam.nearestdistnnz [1] 250000 500 $spam.printsize [1] 49 $spam.safemodevalidity [1] TRUE $spam.structurebased [1] FALSE $spam.trivalues [1] TRUE $spam.validate [1] FALSE > > # Reset to default values: > options(spam.eps=.Machine$double.eps, + spam.drop=FALSE, + spam.printsize=100, + spam.imagesize=10000, + spam.cex=1200, + spam.structurebased=FALSE, + spam.inefficiencywarning=1e6, + spam.trivalues=FALSE, + spam.listmethod="PE", + spam.NAOK=FALSE, + spam.safemodevalidity=TRUE, + spam.dopivoting=TRUE, + spam.cholsymmetrycheck=TRUE, + spam.cholpivotcheck=TRUE, + spam.cholupdatesingular="warning", + spam.cholincreasefactor=c(1.25,1.25), + spam.nearestdistincreasefactor=1.25, + spam.nearestdistnnz=c(400^2,400)) > > > > > cleanEx() > nameEx("ordering") > ### * ordering > > flush(stderr()); flush(stdout()) > > ### Name: ordering > ### Title: Extract the permutation > ### Aliases: ordering ordering.spam ordering-methods ordering.spam.chol > ### ordering.spam.chol.NgPeyton ordering,spam-method > ### ordering,matrix-method > ### Keywords: algebra > > ### ** Examples > > # Construct a pd matrix S to work with (size n) > n <- 100 # dimension > S <- .25^abs(outer(1:n,1:n,"-")) > S <- as.spam( S, eps=1e-4) > I <- diag(n) # Identity matrix > > cholS <- chol( S) > ord <- ordering(cholS) > iord <- ordering(cholS, inv=TRUE) > > R <- as.spam( cholS ) # R'R = P S P', with P=I[ord,], > # a permutation matrix (rows permuted). > RtR <- t(R) %*% R > > # the following are equivalent: > as.spam( RtR - S[ord,ord], eps=1e-15) Zero matrix of dimension 100x100. Class 'spam' (32-bit) > as.spam( RtR[iord,iord] - S, eps=1e-15) Zero matrix of dimension 100x100. Class 'spam' (32-bit) > as.spam( t(R[,iord]) %*% R[,iord] - S, eps=1e-15) Zero matrix of dimension 100x100. Class 'spam' (32-bit) > # we use 'eps' to avoid issues close to machine precision > > # trivially: > as.spam( t(I[iord,]) - I[ord,]) # (P^-1)' = P Zero matrix of dimension 100x100. Class 'spam' (32-bit) > as.spam( t(I[ord,]) - I[,ord]) # Zero matrix of dimension 100x100. Class 'spam' (32-bit) > as.spam( I[iord,] - I[,ord]) Zero matrix of dimension 100x100. Class 'spam' (32-bit) > as.spam( I[ord,]%*%S%*%I[,ord] - S[ord,ord] ) Zero matrix of dimension 100x100. Class 'spam' (32-bit) > # pre and post multiplication with P and P' is ordering > > > > cleanEx() > nameEx("pad") > ### * pad > > flush(stderr()); flush(stdout()) > > ### Name: pad > ### Title: Padding a Sparse Matrix > ### Aliases: pad pad.spam pad<- pad<-.spam pad<-,spam-method > ### pad<-,matrix-method > ### Keywords: array > > ### ** Examples > > x <- diag(4) > dim(x)<-c(2,8) > x [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 1 0 0 0 0 1 0 0 [2,] 0 0 1 0 0 0 0 1 > > s <- diag.spam(4) > pad(s) <- c(7,3) # any positive value can be used > > s <- diag.spam(4) > pad(s) <- c(2,8) # result is different than x > > > > cleanEx() > nameEx("permutation") > ### * permutation > > flush(stderr()); flush(stdout()) > > ### Name: permutation > ### Title: Permute a Matrix > ### Aliases: permutation permutation.spam permutation,spam-method > ### permutation,matrix-method > ### Keywords: array > > ### ** Examples > > A <- spam(1:12,3) > P <- c(3,1,2) > Q <- c(2,3,1,4) > > permutation(A,P,Q)-A[order(P),order(Q)] [,1] [,2] [,3] [,4] [1,] 0 0 0 0 [2,] 0 0 0 0 [3,] 0 0 0 0 Class 'spam' (32-bit) > > permutation(A,P,Q,ind=TRUE)-A[P,Q] [,1] [,2] [,3] [,4] [1,] 0 0 0 0 [2,] 0 0 0 0 [3,] 0 0 0 0 Class 'spam' (32-bit) > > > > > cleanEx() > nameEx("precmat") > ### * precmat > > flush(stderr()); flush(stdout()) > > ### Name: precmat > ### Title: IGMRF Precision Matrices > ### Aliases: precmat precmat.RW1 precmat.RW2 precmat.RWn precmat.season > ### precmat.IGMRFreglat precmat.IGMRFirreglat > ### Keywords: algebra > > ### ** Examples > > n <- 10 > Q <- precmat.RW2( n) > # rmvnorm.prec(1, Q=Q) # does not work, because the matrix is singular. > > Q%*%cbind(1,1:n) [,1] [,2] [1,] 0 0 [2,] 0 0 [3,] 0 0 [4,] 0 0 [5,] 0 0 [6,] 0 0 [7,] 0 0 [8,] 0 0 [9,] 0 0 [10,] 0 0 > > > > cleanEx() > nameEx("print") > ### * print > > flush(stderr()); flush(stdout()) > > ### Name: print > ### Title: Printing and Summarizing Sparse Matrices > ### Aliases: print print.spam print,spam-method print.spam.chol > ### print.spam.chol.NgPeyton summary.spam summary,spam-method > ### summary.spam.chol summary.spam.chol.NgPeyton print_nnzpos > ### Keywords: hplot > > ### ** Examples > > set.seed(13) > smat <- spam_random(8) > par(mfcol=c(1,2),pty='s') > options(spam.printsize=1000) > print(smat) [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 0 0 0 1 1 1 1 1 [2,] 1 1 1 0 0 0 0 0 [3,] 0 0 0 1 1 0 1 1 [4,] 1 0 0 0 0 1 0 0 [5,] 1 0 1 1 1 1 0 1 [6,] 0 0 0 1 0 0 0 0 [7,] 0 0 0 0 1 1 1 1 [8,] 0 1 1 0 1 0 1 1 Class 'spam' (32-bit) > options(spam.printsize=10) > print(smat) [1] 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Class 'spam' (32-bit) > summary(smat) Matrix object of class 'spam' of dimension 8x8, with 30 (row-wise) nonzero elements. Density of the matrix is 46.9%. Class 'spam' (32-bit) > summary(smat)$nnz [1] 30 > > smat@entries[1:5] <- 0 > print(smat, minimal = FALSE) Matrix of dimension 8x8 with (row-wise) nonzero elements: 1 2 3 4 5 6 7 8 ---------------- 1| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' ' ' ' 0 0 0 0 0 2| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' 1 1 1 ' ' ' ' ' 3| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' ' ' ' 1 1 ' 1 1 4| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' 1 ' ' ' ' 1 ' ' 5| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' 1 ' 1 1 1 1 ' 1 6| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' ' ' ' 1 ' ' ' ' 7| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' ' ' ' ' 1 1 1 1 8| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' ' 1 1 ' 1 ' 1 1 class: spam (32-bit) Class 'spam' (32-bit) > print(smat, minimal = FALSE, rowpointer = TRUE) Matrix of dimension 8x8 with (row-wise) nonzero elements, number left of the vertical bars denote the respective rowpointer: 1 2 3 4 5 6 7 8 ---------------- 1| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' ' ' ' 0 0 0 0 0 6| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' 1 1 1 ' ' ' ' ' 9| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' ' ' ' 1 1 ' 1 1 13| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' 1 ' ' ' ' 1 ' ' 15| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' 1 ' 1 1 1 1 ' 1 21| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' ' ' ' 1 ' ' ' ' 22| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' ' ' ' ' 1 1 1 1 26| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%1.0f' ' 1 1 ' 1 ' 1 1 class: spam (32-bit) Class 'spam' (32-bit) > smat@rowpointers [1] 1 6 9 13 15 21 22 26 31 > print_nnzpos(smat) Matrix of dimension 8x8 with (row-wise) nonzero elements: 1 2 3 4 5 6 7 8 ------------------------ 1| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' ' ' ' 1 2 3 4 5 2| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 6 7 8 ' ' ' ' ' 3| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' ' ' ' 9 10 ' 11 12 4| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 13 ' ' ' ' 14 ' ' 5| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' 15 ' 16 17 18 19 ' 20 6| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' ' ' ' 21 ' ' ' ' 7| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' ' ' ' ' 22 23 24 25 8| Warning in sprintf(paste0("%", width, ".", digits, "f", collapse = ""), : one argument not used by format '%2.0f' ' 26 27 ' 28 ' 29 30 class: spam (32-bit) Class 'spam' (32-bit) > > > > > graphics::par(get("par.postscript", pos = 'CheckExEnv')) > cleanEx() > nameEx("random") > ### * random > > flush(stderr()); flush(stdout()) > > ### Name: random > ### Title: Create Random Sparse Matrices > ### Aliases: spam_random > > ### ** Examples > > set.seed(42) > rspam <- spam_random(500, digits = 2, distribution = rnorm, sd = 2, mean = 10, density = .01) > display.spam(rspam, cex = 2) > > > > cleanEx() > nameEx("rgrf") > ### * rgrf > > flush(stderr()); flush(stdout()) > > ### Name: rgrf > ### Title: Draw From a Gaussian Random Field > ### Aliases: rgrf rgrf.spam > ### Keywords: algebra > > ### ** Examples > > require(fields) Loading required package: fields Loading required package: viridisLite Try help(fields) to get started. > # Regular grid with constant mean: > nx <- 10 > field <- rgrf(1, nx=nx, Covariance="cov.wend2", theta=c(.5, 1), beta=5) > quilt.plot(cbind(attr(field,"locs"),z=field), nx=nx, ny=nx) > points(attr(field,"locs")) > > # Irregluar grid: > field <- rgrf(1, nx=10, tau=0.3, Covariance="cov.mat", theta=c(.2, 1, 1.5)) > fields::quilt.plot(attr(field,"locs"), field) > > > > > cleanEx() detaching ‘package:fields’, ‘package:viridisLite’ > nameEx("rmvnorm") > ### * rmvnorm > > flush(stderr()); flush(stdout()) > > ### Name: rmvnorm > ### Title: Draw Multivariate Normals > ### Aliases: rmvnorm rmvnorm.spam rmvnorm.prec rmvnorm.canonical > ### Keywords: algebra > > ### ** Examples > > # Generate multivariate from a covariance inverse: > # (usefull for GRMF) > set.seed(13) > n <- 25 # dimension > N <- 1000 # sample size > Sigmainv <- .25^abs(outer(1:n,1:n,"-")) > Sigmainv <- as.spam( Sigmainv, eps=1e-4) > > > Sigma <- solve( Sigmainv) # for verification > iidsample <- array(rnorm(N*n),c(n,N)) > > mvsample <- backsolve( chol(Sigmainv), iidsample) > norm( var(t(mvsample)) - Sigma, type="m") [1] 0.1326448 > > # compare with: > mvsample <- backsolve( chol(as.matrix( Sigmainv)), iidsample, n) > #### ,n as patch > norm( var(t(mvsample)) - Sigma, type="m") [1] 0.1326447 > > > # 'solve' step by step: > b <- rnorm( n) > R <- chol(Sigmainv) > norm( backsolve( R, forwardsolve( R, b))- + solve( Sigmainv, b) ) [1] 0 > norm( backsolve( R, forwardsolve( R, diag(n)))- Sigma ) [1] 0 > > > > > > cleanEx() > nameEx("rmvnorm.cond") > ### * rmvnorm.cond > > flush(stderr()); flush(stdout()) > > ### Name: rmvnorm.conditional > ### Title: Draw Conditional Multivariate Normals > ### Aliases: rmvnorm.cond rmvnorm.conditional rmvnorm.conditional.spam > ### Keywords: algebra > > ### ** Examples > > set.seed(12) > N <- 300 > y <- c(5, -5, -5, 5) > SigmaXX <- as.spam(.95^abs(outer(1:N, 1:N, "-")), eps=1e-4) > sel <- c(10, 100, 120, 300) # where we observe y > SigmaXY <- SigmaXX[, sel] > SigmaYY <- SigmaXX[sel,sel] + diag.spam(.01, length(y)) # some noise > x <- rmvnorm.conditional(3, y, SigmaXX=SigmaXX, SigmaXY=SigmaXY, + SigmaYY=SigmaYY) > # unconditional sample: > ux <- rmvnorm(1, Sigma=SigmaXX) > matplot(t(rbind(x, ux)), type='l', lty=1) > points(sel, y, pch=19) > > > > cleanEx() > nameEx("rmvnorm.const") > ### * rmvnorm.const > > flush(stderr()); flush(stdout()) > > ### Name: rmvnorm.const > ### Title: Draw Constrainted Multivariate Normals > ### Aliases: rmvnorm.const rmvnorm.prec.const rmvnorm.canonical.const > ### Keywords: algebra > > ### ** Examples > > # to be filled in > > > > > cleanEx() > nameEx("rowSums") > ### * rowSums > > flush(stderr()); flush(stdout()) > > ### Name: rowSums > ### Title: Form Row and Column Sums and Means > ### Aliases: rowSums.spam colSums.spam rowMeans.spam colMeans.spam rowSums > ### colSums rowMeans colMeans rowSums,spam-method colSums,spam-method > ### rowMeans,spam-method colMeans,spam-method > ### Keywords: manip > > ### ** Examples > > x <- spam( rnorm(20), 5, 4) > rowSums( x) [1] 0.01992536 1.04472535 0.22529172 0.77758346 1.74295162 > c( x %*% rep(1,4)) [1] 0.01992536 1.04472535 0.22529172 0.77758346 1.74295162 > > > > cleanEx() > nameEx("spam-class") > ### * spam-class > > flush(stderr()); flush(stdout()) > > ### Name: spam-class > ### Title: Class "spam" > ### Aliases: spam.class spam-class as.matrix,spam-method as.matrix.spam > ### [<-,spam,ANY,ANY,ANY-method [<-,spam,matrix,matrix,ANY-method > ### [<-,spam,matrix,missing,ANY-method > ### [<-,spam,missing,missing,ANY-method > ### [<-,spam,missing,vector,ANY-method > ### [<-,spam,missing,vector,spam-method [<-,spam,spam,missing,ANY-method > ### [<-,spam,vector,missing,ANY-method > ### [<-,spam,vector,missing,spam-method [<-,spam,vector,vector,ANY-method > ### [<-,spam,vector,vector,spam-method > ### [<-,spam,missing,missing,numeric-method > ### [<-,spam,missing,vector,numeric-method > ### [<-,spam,vector,missing,numeric-method > ### [<-,spam,vector,vector,numeric-method > ### [<-,spam,matrix,missing,numeric-method > ### [<-,spam,matrix,matrix,numeric-method > ### [<-,spam,spam,missing,numeric-method [<-,spam,ANY-method > ### [,spam,missing,missing,ANY-method [,spam,missing,vector,ANY-method > ### [,spam,vector,missing,logical-method > ### [,spam,vector,missing,missing-method [,spam,vector,vector,ANY-method > ### [,spam,matrix,missing,missing-method > ### [,spam,matrix,missing,logical-method [,spam,matrix,matrix,ANY-method > ### [,spam,spam,missing,ANY-method [,spam,ANY,ANY,ANY-method > ### Arith,spam,spam-method Arith,spam,ANY-method Arith,ANY,spam-method > ### Compare,ANY,spam-method Compare,spam,ANY-method > ### Compare,spam,spam-method !,spam-method +,spam,missing-method > ### -,spam,missing-method c,spam-method t,spam-method > ### length<-,spam-method length,spam-method lower.tri,spam-method > ### plot,spam,missing-method plot,spam,spam-method show,spam-method > ### upper.tri,spam-method > ### Keywords: classes > > ### ** Examples > > showMethods("as.spam") Function: as.spam (package spam) x="ANY" x="dist" x="integer" (inherited from: x="numeric") x="list" x="matrix" x="numeric" x="spam" x="spam.chol.NgPeyton" > > > smat <- diag.spam(runif(15)) > range(smat) [1] 0.0000000 0.9446753 > cos(smat) [1] 0.9649592 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [8] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [15] 1.0000000 1.0000000 0.9315572 1.0000000 1.0000000 1.0000000 1.0000000 [22] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [29] 1.0000000 1.0000000 1.0000000 1.0000000 0.8403578 1.0000000 1.0000000 [36] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [43] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.6151597 [50] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [57] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [64] 1.0000000 0.9797310 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [71] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [78] 1.0000000 1.0000000 1.0000000 0.6228706 1.0000000 1.0000000 1.0000000 [85] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [92] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.5860060 1.0000000 [99] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [106] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [113] 0.7895028 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [120] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [127] 1.0000000 1.0000000 0.8085491 1.0000000 1.0000000 1.0000000 1.0000000 [134] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [141] 1.0000000 1.0000000 1.0000000 1.0000000 0.9980918 1.0000000 1.0000000 [148] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [155] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.9788621 [162] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [169] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [176] 1.0000000 0.9844543 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [183] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [190] 1.0000000 1.0000000 1.0000000 0.7731377 1.0000000 1.0000000 1.0000000 [197] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [204] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 0.9271347 1.0000000 [211] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [218] 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 1.0000000 [225] 0.7180211 Class 'spam' (32-bit) > > > > cleanEx() > nameEx("spam-operations") > ### * spam-operations > > flush(stderr()); flush(stdout()) > > ### Name: spam-operations > ### Title: Basic Linear Algebra for Sparse Matrices > ### Aliases: Ops.spam spam.ops %*%-methods %*%,ANY,ANY-method > ### %*%,spam,spam-method %*%,spam,matrix-method %*%,spam,numeric-method > ### %*%,matrix,spam-method %*%,numeric,spam-method %d*% > ### %d*%,spam,spam-method %d*%,spam,ANY-method %d*%,matrix,spam-method > ### %d*%,matrix,ANY-method %d*%,spam,numeric-method > ### %d*%,numeric,spam-method %d*%,numeric,matrix-method > ### %d*%,numeric,numeric-method %d+% %d+%,spam,spam-method > ### %d+%,spam,ANY-method %d+%,matrix,spam-method %d+%,matrix,ANY-method > ### %d+%,spam,numeric-method %d+%,numeric,matrix-method > ### %d+%,numeric,spam-method %d+%,numeric,numeric-method > ### +,spam,spam-method +,matrix,spam-method +,spam,matrix-method > ### +,ANY,spam-method +,spam,ANY-method -,spam,spam-method > ### -,matrix,spam-method -,spam,matrix-method -,ANY,spam-method > ### -,spam,ANY-method *,spam,spam-method *,ANY,spam-method > ### *,spam,ANY-method /,spam,spam-method /,ANY,spam-method > ### /,spam,ANY-method /,matrix,spam-method ^,spam,spam-method > ### ^,ANY,spam-method ^,spam,ANY-method &,spam,ANY-method > ### &,spam,spam-method &,ANY,spam-method |,spam,ANY-method > ### |,ANY,spam-method |,spam,spam-method ^,spam-method %%,spam-method > ### %/%,spam-method >,spam-method >=,spam-method <,spam-method > ### <=,spam-method ==,spam-method !=,spam-method norm norm.spam > ### norm,ANY-method norm,spam,character-method norm,spam,missing-method > ### norm,numeric,missing-method norm,numeric,character-method > ### norm,matrix,missing-method norm,matrix,character-method t.spam > ### ncol,spam-method nrow,spam-method dim,ANY-method dim,spam-method > ### [.spam [<-.spam [<-,spam,missing,missing-method > ### [<-,spam,missing,vector-method [<-,spam,vector,missing-method > ### [<-,spam,vector,vector-method [<-,spam,matrix,missing-method > ### [<-,spam,matrix,matrix-method [<-,spam,spam,missing-method > ### [<-,spam,ANY,ANY-method plot.spam subset.spam assign.spam > ### Keywords: algebra > > ### ** Examples > > # create a weight matrix and scale it: > ## Not run: > ##D wij <- distmat > ##D # with distmat from a nearest.dist(..., upper=TRUE) call > ##D > ##D n <- dim(wij)[1] > ##D > ##D wij@entries <- kernel( wij@entries, h) # for some function kernel > ##D wij <- wij + t(wij) + diag.spam(n) # adjust from diag=FALSE, upper=TRUE > ##D > ##D sumwij <- wij %*% rep(1,n) > ##D # row scaling: > ##D # wij@entries <- wij@entries/sumwij[ wij@colindices] > ##D # col scaling: > ##D wij@entries <- wij@entries/sumwij[ rep(1:n, diff(wij@rowpointers))] > ## End(Not run) > > > > cleanEx() > nameEx("spam-package") > ### * spam-package > > flush(stderr()); flush(stdout()) > > ### Name: spam-package > ### Title: SPArse Matrix Package > ### Aliases: spam-package SPAM Spam '. SPAM .' > ### Keywords: documentation package > > ### ** Examples > > ## Citations: > citation('spam') To cite `spam` in publications use: Furrer, R., Flury R. and Gerber, F. (2023). spam: SPArse Matrix. R package version 2.10-0. URL https://CRAN.R-project.org/package=spam Reinhard Furrer, Stephan R. Sain (2010). spam: A Sparse Matrix R Package with Emphasis on MCMC Methods for Gaussian Markov Random Fields. Journal of Statistical Software, 36(10), 1-25. https://doi.org/10.18637/jss.v036.i10. Florian Gerber, Reinhard Furrer (2015). Pitfalls in the Implementation of Bayesian Hierarchical Modeling of Areal Count Data: An Illustration Using BYM and Leroux Models. Journal of Statistical Software, Code Snippets, 63(1), 1-32. https://doi.org/10.18637/jss.v063.c01. F. Gerber, K. Moesinger, R. Furrer (2017), Extending R packages to support 64-bit compiled code: An illustration with spam64 and GIMMS NDVI3g data. Computer & Geoscience 104, 109-119, https://doi.org/10.1016/j.cageo.2016.11.015. To see these entries in BibTeX format, use 'print(, bibtex=TRUE)', 'toBibtex(.)', or set 'options(citation.bibtex.max=999)'. > citation('spam', auto=TRUE) To cite package ‘spam’ in publications use: Furrer R, Gerber F, Flury R (2023). _spam: SPArse Matrix_. R package version 2.10-0, . A BibTeX entry for LaTeX users is @Manual{, title = {spam: SPArse Matrix}, author = {Reinhard Furrer and Florian Gerber and Roman Flury}, year = {2023}, note = {R package version 2.10-0}, url = {https://www.math.uzh.ch/pages/spam/}, } > > > ## History of changes > ## Not run: > ##D file.show(system.file("NEWS.md", package = "spam")) > ## End(Not run) > > > > cleanEx() > nameEx("spam-solve") > ### * spam-solve > > flush(stderr()); flush(stdout()) > > ### Name: spam-solve > ### Title: Linear Equation Solving for Sparse Matrices > ### Aliases: solve backsolve forwardsolve backsolve-methods > ### backsolve,ANY-method backsolve,spam-method backsolve,matrix-method > ### backsolve.spam forwardsolve-methods forwardsolve,ANY-method > ### forwardsolve,spam-method forwardsolve,matrix-method forwardsolve.spam > ### chol2inv chol2inv.spam chol2inv,spam-method > ### chol2inv,spam.chol.NgPeyton-method solve.spam solve,ANY-method > ### solve,spam-method > ### Keywords: algebra > > ### ** Examples > > # Generate multivariate form a covariance inverse: > # (usefull for GRMF) > set.seed(13) > n <- 25 # dimension > N <- 1000 # sample size > Sigmainv <- .25^abs(outer(1:n,1:n,"-")) > Sigmainv <- as.spam( Sigmainv, eps=1e-4) > > > Sigma <- solve( Sigmainv) # for verification > iidsample <- array(rnorm(N*n),c(n,N)) > > mvsample <- backsolve( chol(Sigmainv), iidsample) > norm( var(t(mvsample)) - Sigma) [1] 1.049394 > > # compare with: > mvsample <- backsolve( chol(as.matrix( Sigmainv)), iidsample, n) > #### ,n as patch > norm( var(t(mvsample)) - Sigma) [1] 1.040029 > > > > # 'solve' step by step: > b <- rnorm( n) > R <- chol(Sigmainv) > norm( backsolve( R, forwardsolve( R, b))- + solve( Sigmainv, b) ) [1] 0 > norm( backsolve( R, forwardsolve( R, diag(n)))- Sigma ) [1] 0 > > > # 'update': > R1 <- update( R, Sigmainv + diag.spam( n)) > > > > > > > cleanEx() > nameEx("spam") > ### * spam > > flush(stderr()); flush(stdout()) > > ### Name: spam > ### Title: Sparse Matrix Class > ### Aliases: spam.creation initialize,spam-method spam spam.list > ### spam.numeric spam,list-method spam,numeric-method > ### as.spam,matrix-method as.spam,numeric-method as.spam,spam-method > ### as.spam,dist-method as.spam,list-method as.spam as.spam.spam > ### as.spam.numeric as.spam.matrix as.spam.chol.NgPeyton as.spam.dist > ### as.spam.list is.spam > ### Keywords: algebra > > ### ** Examples > > # old message, do not loop, when you create a large sparse matrix > set.seed(13) > nz <- 128 > ln <- nz^2 > smat <- spam(0,ln,ln) > is <- sample(ln,nz) > js <- sample(ln,nz) > ## IGNORE_RDIFF_BEGIN > system.time(for (i in 1:nz) smat[is[i], js[i]] <- i) user system elapsed 0.031 0.004 0.035 > system.time(smat[cbind(is,js)] <- 1:nz) user system elapsed 0.001 0.000 0.002 > ## IGNORE_RDIFF_END > > getClass("spam") Class "spam" [package "spam"] Slots: Name: entries colindices rowpointers dimension Class: numeric numeric numeric numeric > > > options(spam.NAOK=TRUE) > as.spam(c(1, NA)) [,1] [1,] 1 [2,] NA Class 'spam' (32-bit) > > > > cleanEx() > nameEx("spam.chol.NgPeyton-class") > ### * spam.chol.NgPeyton-class > > flush(stderr()); flush(stdout()) > > ### Name: spam.chol.NgPeyton-class > ### Title: Class "spam.chol.NgPeyton" > ### Aliases: spam.chol.NgPeyton-class as.matrix,spam.chol.NgPeyton-method > ### as.spam,spam.chol.NgPeyton-method backsolve,spam.chol.NgPeyton-method > ### c,spam.chol.NgPeyton-method determinant,spam.chol.NgPeyton-method > ### diag,spam.chol.NgPeyton-method diag<-,spam.chol.NgPeyton-method > ### dim<-,spam.chol.NgPeyton-method dim,spam.chol.NgPeyton-method > ### display,spam.chol.NgPeyton-method > ### forwardsolve,spam.chol.NgPeyton-method > ### image,spam.chol.NgPeyton-method length<-,spam.chol.NgPeyton-method > ### length,spam.chol.NgPeyton-method ordering,spam.chol.NgPeyton-method > ### print,spam.chol.NgPeyton-method show,spam.chol.NgPeyton-method > ### summary,spam.chol.NgPeyton-method t,spam.chol.NgPeyton-method > ### chol,spam.chol.NgPeyton-method > ### Keywords: classes > > ### ** Examples > > x <- spam( c(4,3,0,3,5,1,0,1,4),3) > cf <- chol( x) > cf (Upper) Cholesky factor of dimension 3x3 with 5 (row-wise) nonzero elements ( 2.42 Kb). (The object is supposed to be used with: 'as.spam', 'backsolve', 'forwardsolve', etc.) Class 'spam.chol.NgPeyton' > as.spam( cf) [,1] [,2] [,3] [1,] 2 0 0.500000 [2,] 0 2 1.500000 [3,] 0 0 1.581139 Class 'spam' (32-bit) > > > # Modify at own risk... > slotNames(cf) [1] "entries" "colindices" "colpointers" "rowpointers" "dimension" [6] "pivot" "invpivot" "supernodes" "snmember" "memory" [11] "nnzA" > > > > > cleanEx() > nameEx("toeplitz") > ### * toeplitz > > flush(stderr()); flush(stdout()) > > ### Name: toeplitz > ### Title: Create Toeplitz Matrices > ### Aliases: toeplitz.spam > ### Keywords: array algebra > > ### ** Examples > > toeplitz.spam(c(1,.25,0,0,0)) [1] 1.00 0.25 0.25 1.00 0.25 0.25 1.00 0.25 0.25 1.00 0.25 0.25 1.00 Class 'spam' (32-bit) > > > > > cleanEx() > nameEx("triplet") > ### * triplet > > flush(stderr()); flush(stdout()) > > ### Name: triplet > ### Title: Transform a "spam" Format to Triplets > ### Aliases: triplet > ### Keywords: array > > ### ** Examples > > x <- diag.spam(1:4) > x[2,3] <- 5 > triplet(x) $indices [,1] [,2] [1,] 1 1 [2,] 2 2 [3,] 2 3 [4,] 3 3 [5,] 4 4 $values [1] 1 2 5 3 4 > all.equal( spam( triplet(x, tri=TRUE)), x) [1] TRUE > > > > > cleanEx() > nameEx("validate_spam") > ### * validate_spam > > flush(stderr()); flush(stdout()) > > ### Name: validate_spam > ### Title: Validate a Sparse Matrix > ### Aliases: validate_spam > > ### ** Examples > > validate_spam(spam(1, 20)) [1] TRUE > > > > cleanEx() > nameEx("version") > ### * version > > flush(stderr()); flush(stdout()) > > ### Name: version > ### Title: Spam Version Information > ### Aliases: version spam.version spam.Version > ### Keywords: environment sysdata programming > > ### ** Examples > > spam.version$version.string [1] "Spam version 2.10-0 (2023-10-23)" > > > > ### *