diff --git a/DESCRIPTION b/DESCRIPTION index 531b83e..f2a9858 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: exactLoglinTest -Version: 1.4.1 +Version: 1.4.2 Title: Monte Carlo Exact Tests for Log-linear models Author: Brian Caffo Maintainer: Brian Caffo @@ -9,6 +9,6 @@ Description: Monte Carlo and MCMC goodness of fit tests for log-linear models License: GPL URL: http://www.bcaffo.com -Packaged: 2012-12-03 19:51:20 UTC; bcaffo +Packaged: 2013-02-05 11:58:52 UTC; bcaffo Repository: CRAN -Date/Publication: 2012-12-04 07:07:21 +Date/Publication: 2013-02-05 13:40:27 diff --git a/MD5 b/MD5 index ff506bc..993be94 100644 --- a/MD5 +++ b/MD5 @@ -1,25 +1,25 @@ -627fecafbd757c2fadf8ed1696cc579d *DESCRIPTION +67b70a865008305a9109c6a74940813c *DESCRIPTION ba07efd67ec0c9d5a5fedbe43af0df76 *NAMESPACE 6bcf5ab392d1e591bce0418171e8d3e0 *R/build.mcx.obj.R -c97db76596ef7c5eb26ce5a1b83ce274 *R/errorcheck.R +1146c62b8f11eab74e4651623a760c07 *R/errorcheck.R 670a05b31de751144df7e9534365caad *R/gof.R 95b8b992a2032439d5243790a7656cc6 *R/hyper.R bb1ffc44813f88ee1adb439211dda2ec *R/mcexact.R 69d3266b6a0334e88443cbe7edad9b59 *R/print.mcexact.R 86f3c4f5423bd6041517e24a4817830f *R/rounded.tprob.R fd6e0ec26f0fec9ee8c127fd2455c874 *R/simtable.bab.R -36b303411bb983619a37dfe1d5465a6f *R/simtable.cab.R +809b625955a5818294c02f6cce2b9001 *R/simtable.cab.R ccccb261edc5d39e1ebb11ff60fafe34 *R/simulateConditional.R c03a3b49b9fd5fed803c17e02ea48008 *R/summary.mcexact.R bd20b80540bb907e6655961088fcf78e *R/update.bab.R -5271764eb73d25c9d69e7baff9509b6d *R/update.cab.R +5bcde7ef185eaf1580a487fad24d40b5 *R/update.cab.R 5f86ba929c74b916293a4836ee969588 *data/alligator.dat.rda fdad3655d16cb42727c27c578344e6e7 *data/czech.dat.rda e1504c30c0d447b8c4ab790d2feee4b3 *data/pathologist.dat.rda a06682a6f917244d46336fb6308cc67f *data/residence.dat.rda 90296f97af716d2c25473a9d32feb1ff *data/titanic.dat.rda 46c57ca7a6bf358fc5818ed9b0a21159 *inst/doc/exactLoglinTest.Rnw -3fddfdbdb647ddad7cbdcb7ea03584eb *inst/doc/exactLoglinTest.pdf +165f516c9501c4ad696ca91d25fa6226 *inst/doc/exactLoglinTest.pdf 77c56bf3abbf9c9707934de9ad690c0d *man/alligator.dat.Rd f6157dd8ec3d2ee4bf70bfc07a694af2 *man/czech.dat.Rd c5f274e9fa231652611786e3f8d79b86 *man/gof.Rd diff --git a/R/errorcheck.R b/R/errorcheck.R index 50c0e1d..5e60644 100644 --- a/R/errorcheck.R +++ b/R/errorcheck.R @@ -1,7 +1,7 @@ #x is the design matrix errorcheck <- function(y, x, stat, dens, nosim, method, savechain, tdf, maxiter, p, batchsize){ - if ((!is.real(y)) & (!is.integer(y))) - stop("y must be real or integer valued") + if ((!is.double(y)) & (!is.integer(y))) + stop("y must be double or integer valued") else { if (any(y < 0)) stop("y must be positive") @@ -11,8 +11,8 @@ errorcheck <- function(y, x, stat, dens, nosim, method, savechain, tdf, maxiter, if (!is.matrix(x)) stop("x must a matrix") - else if ((!is.real(x)) & (!is.integer(x))) - stop("x must be real or integer valued") + else if ((!is.double(x)) & (!is.integer(x))) + stop("x must be double or integer valued") else if (qr(x)$rank > dim(x)[2]) stop("Rank(x) <= number of rows") else if (dim(x)[2] < 2) @@ -26,27 +26,27 @@ errorcheck <- function(y, x, stat, dens, nosim, method, savechain, tdf, maxiter, if (!is.function(dens)) stop("dens must be a function") - if ((!is.real(nosim)) & (!is.integer(nosim))) stop("nosim must be real or integer valued") + if ((!is.double(nosim)) & (!is.integer(nosim))) stop("nosim must be double or integer valued") else if (nosim <= 0) stop("nosim < 0 not allowed") if (method != "bab" & method != "cab") stop("method must be either cab or bab") - if ((!is.real(tdf)) & (!is.integer(tdf))) stop("tdf must be real or integer valued") + if ((!is.double(tdf)) & (!is.integer(tdf))) stop("tdf must be double or integer valued") else if (tdf <= 0) stop("tdf < 0 not allowed") - if (!is.null(maxiter) & !is.real(maxiter) & !is.integer(maxiter)) - stop("maxiter must be null, real or integer valued") + if (!is.null(maxiter) & !is.double(maxiter) & !is.integer(maxiter)) + stop("maxiter must be null, double or integer valued") else if (method == "bab" & is.null(maxiter)) stop("maxiter must be specified if method = bab") else if (maxiter < nosim) stop("maxiter >= nosim") - if (!is.null(p) & !is.real(p) & !is.integer(p)) - stop("p must be null, real or integer valued") + if (!is.null(p) & !is.double(p) & !is.integer(p)) + stop("p must be null, double or integer valued") else if (method == "cab" & is.null(p)) stop("p must be specified if method = cab") else if (!is.null(p)) if (p < 0 | p > 1) stop("p must be between 0 and 1") - if (!is.null(batchsize) & !is.real(batchsize) & !is.integer(batchsize)) - stop("batchsize must be null, real or integer valued") + if (!is.null(batchsize) & !is.double(batchsize) & !is.integer(batchsize)) + stop("batchsize must be null, double or integer valued") else if (method == "cab"){ if (is.null(batchsize)) stop("batchsize must be specified if method = bab") diff --git a/R/simtable.cab.R b/R/simtable.cab.R index 56c45c8..c44ce9f 100644 --- a/R/simtable.cab.R +++ b/R/simtable.cab.R @@ -1,7 +1,7 @@ simtable.cab <- function(args, nosim = NULL, p = NULL, y.start = NULL){ ##error checking and initializing if (!is.null(p)){ - if (!is.real(p)) stop("p must be real valued") + if (!is.double(p)) stop("p must be double") else if ((p < 0) | (p > 1)) stop("p must be in [0,1]") } if (!is.null(nosim)) args$nosim <- nosim @@ -33,8 +33,8 @@ simtable.cab <- function(args, nosim = NULL, p = NULL, y.start = NULL){ temp <- .Call("multinorm", conde1.permute, condv1.permute, - as.real(staysfixed), - as.real(y1.old.permute), + as.double(staysfixed), + as.double(y1.old.permute), args$tdf, as.integer(k), PACKAGE="exactLoglinTest") diff --git a/R/update.cab.R b/R/update.cab.R index 11a6755..1f1aba8 100644 --- a/R/update.cab.R +++ b/R/update.cab.R @@ -7,7 +7,7 @@ update.cab <- function(object,...){ cab <- function(args, nosim = NULL, batchsize = NULL, savechain = FALSE, p = NULL, flush = FALSE){ ##error checking and initializing if (!is.null(p)){ - if (!is.real(p)) stop("p must be real valued") + if (!is.double(p)) stop("p must be double") else if ((p < 0) | (p > 1)) stop("p must be in [0,1]") } if (!is.null(batchsize)) args$batchsize <- batchsize @@ -52,8 +52,8 @@ cab <- function(args, nosim = NULL, batchsize = NULL, savechain = FALSE, p = NUL temp <- .Call("multinorm", conde1.permute, condv1.permute, - as.real(staysfixed), - as.real(y1.old.permute), + as.double(staysfixed), + as.double(y1.old.permute), args$tdf, as.integer(k), PACKAGE="exactLoglinTest") diff --git a/inst/doc/exactLoglinTest.pdf b/inst/doc/exactLoglinTest.pdf index bedb698..0174b9d 100644 Binary files a/inst/doc/exactLoglinTest.pdf and b/inst/doc/exactLoglinTest.pdf differ