R Under development (unstable) (2023-08-08 r84908 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 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. 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. > cat("# boot ints test\n") # boot ints test > # edge case with user defined breaks in qgcomp boot where msm.fit doesn't reach all > # the quantiles > library(qgcomp) > > > z <- cbind(rnorm(100),rnorm(100),rnorm(100),rnorm(100)) > > y <- -1 + z %*% c(2,1,0.5,0) + z^2 %*% c(.2,.2,0.5,0) + rnorm(100) > Zn = paste0("z.", 1:4) > qft <- as.formula( + paste("y ~",paste(Zn, collapse = "+"), "+", paste0(Zn, '*', Zn, collapse = "+")) + ) > > dat = data.frame(y=y,z=z) > > #first define breaks > qdat <- quantize(dat, expnms = Zn, q = 6, breaks = NULL) > > # now use these breaks > qdat2 <- quantize(dat, expnms = Zn, q=NULL, breaks=qdat$breaks) > > # should be true > stopifnot(identical(qdat,qdat2)) > > res1 <- qgcomp.boot(qft, degree=2, expnms = Zn, data = dat, + q = 6, + B=20, seed = 12312) > # should be true > stopifnot(identical(res1$breaks, qdat$breaks)) > > res2 <- qgcomp.boot(qft, degree=2, expnms = Zn, data = dat, + breaks = qdat$breaks, + B=20, seed = 12312) > # should be true > stopifnot(identical(res2$breaks, qdat$breaks)) > > # should have identical x axes > > # should be true > stopifnot(identical(res1$msmfit$df.null, res2$msmfit$df.null)) > > cat("done") done> > proc.time() user system elapsed 3.35 0.28 3.62