From 68317d81dcf11a1f6c6f92671dbe23fe1d7268d1 Mon Sep 17 00:00:00 2001 From: Julia Wrobel Date: Sun, 23 Jul 2023 16:40:02 +0000 Subject: [PATCH] version 0.1-32 --- DESCRIPTION | 14 ++++++------ MD5 | 16 ++++++-------- R/pffr-ffpc.R | 2 +- R/pffr.R | 6 ++--- R/plot.pfr.R | 12 ++++------ man/Predict.matrix.pcre.random.effect.Rd | 0 man/coef.pffr.Rd | 0 man/coefboot.pffr.Rd | 0 man/expand.call.Rd | 0 man/ff.Rd | 0 man/ffpc.Rd | 2 +- man/ffpcplot.Rd | 0 man/model.matrix.pffr.Rd | 0 man/pcre.Rd | 0 man/pffr.Rd | 6 ++--- man/pffrGLS.Rd | 0 man/pffrSim.Rd | 0 man/pfr_plot.gam.Rd | 3 --- man/plot.pffr.Rd | 0 man/predict.pffr.Rd | 0 man/print.summary.pffr.Rd | 0 man/quadWeights.Rd | 0 man/re.Rd | 0 man/refund-internal.Rd | 28 ------------------------ man/refund-package.Rd | 24 -------------------- man/sff.Rd | 0 man/smooth.construct.pcre.smooth.spec.Rd | 0 man/smooth.construct.pss.smooth.spec.Rd | 0 man/summary.pffr.Rd | 0 29 files changed, 26 insertions(+), 87 deletions(-) mode change 100755 => 100644 man/Predict.matrix.pcre.random.effect.Rd mode change 100755 => 100644 man/coef.pffr.Rd mode change 100755 => 100644 man/coefboot.pffr.Rd mode change 100755 => 100644 man/expand.call.Rd mode change 100755 => 100644 man/ff.Rd mode change 100755 => 100644 man/ffpc.Rd mode change 100755 => 100644 man/ffpcplot.Rd mode change 100755 => 100644 man/model.matrix.pffr.Rd mode change 100755 => 100644 man/pcre.Rd mode change 100755 => 100644 man/pffrGLS.Rd mode change 100755 => 100644 man/pffrSim.Rd mode change 100755 => 100644 man/plot.pffr.Rd mode change 100755 => 100644 man/predict.pffr.Rd mode change 100755 => 100644 man/print.summary.pffr.Rd mode change 100755 => 100644 man/quadWeights.Rd mode change 100755 => 100644 man/re.Rd delete mode 100644 man/refund-internal.Rd delete mode 100644 man/refund-package.Rd mode change 100755 => 100644 man/sff.Rd mode change 100755 => 100644 man/smooth.construct.pcre.smooth.spec.Rd mode change 100755 => 100644 man/smooth.construct.pss.smooth.spec.Rd mode change 100755 => 100644 man/summary.pffr.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 9d390f2..248bf7b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: refund Type: Package Title: Regression with Functional Data -Version: 0.1-31 -Date: 2023-06-26 +Version: 0.1-32 +Date: 2023-07-17 Authors@R: c( person("Jeff", "Goldsmith", role = "aut", email = "jeff.goldsmith@columbia.edu"), person("Fabian", "Scheipl", role = "aut", email = "fabian.scheipl@stat.uni-muenchen.de"), @@ -27,9 +27,9 @@ Authors@R: c( person("Ruonan", "Li", role="ctb", email="rli20@ncsu.edu"), person("Zheyuan", "Li", role="ctb")) Depends: R (>= 3.5.0) -Imports: fda, Matrix, lattice, boot, mgcv (>= 1.8-23), MASS, magic, - nlme, gamm4, lme4, RLRsim, splines, grpreg, ggplot2, stats, - pbs, methods +Imports: fda, Matrix, lattice, boot, mgcv (>= 1.9), MASS, magic, nlme, + gamm4, lme4, RLRsim, splines, grpreg, ggplot2, stats, pbs, + methods Suggests: RColorBrewer, reshape2, testthat Description: Methods for regression for functional data, including function-on-scalar, scalar-on-function, and @@ -66,7 +66,7 @@ Collate: 'Omegas.R' 'af.R' 'af_old.R' 'amc.R' 'ccb.fpc.R' RoxygenNote: 7.2.3 Encoding: UTF-8 NeedsCompilation: no -Packaged: 2023-06-27 15:25:37 UTC; wrobelj +Packaged: 2023-07-17 20:30:53 UTC; wrobelj Author: Jeff Goldsmith [aut], Fabian Scheipl [aut], Lei Huang [aut], @@ -90,4 +90,4 @@ Author: Jeff Goldsmith [aut], Ruonan Li [ctb], Zheyuan Li [ctb] Maintainer: Julia Wrobel -Date/Publication: 2023-06-29 12:50:02 UTC +Date/Publication: 2023-07-23 16:40:02 UTC diff --git a/MD5 b/MD5 index b6aaf42..25c40d1 100644 --- a/MD5 +++ b/MD5 @@ -1,4 +1,4 @@ -bfc9b2ea88a3cbaded0bb22b558488b9 *DESCRIPTION +e6fc92c9468cb010919f506ad71be75b *DESCRIPTION d07c8587c80600b57b321d602ef61928 *NAMESPACE 9e8ee7293f8e631aa493bec1a19c0c45 *R/CD4-data.R 423e0e7e78259f82ac03416c532deb49 *R/COVID19-data.R @@ -63,13 +63,13 @@ dfc9b0b4802607bd388f8f736ccd0ba1 *R/mfpca.face.R bde2d12a84269416bb06b401efb1382d *R/peer.R 78e3ca1fd1d490e453b040d801b31260 *R/peer_old.R 5edd5816a48757991887f6d83b6dfc0b *R/pffr-ff.R -5c930dded727731d474f5b493dab36a4 *R/pffr-ffpc.R +2e84254549d9fe03c6c1aab59a7fe1e3 *R/pffr-ffpc.R 3fe43fb9b33515088d4fd0e945b7f3e4 *R/pffr-methods.R 7ebd45e78e494092edc5850edf0b7afa *R/pffr-pcre.R b00a440b3fc2c554c314254a5f7730ce *R/pffr-robust.R 0d22801c3dd9c9c502720625d25f9ad9 *R/pffr-sff.R 21121a37471fbba396a8c109cdac9291 *R/pffr-utilities.R -e645640bdabd5391cf7ccf9aa63ed2b1 *R/pffr.R +58022a0991d2dc5590a0eb8f9d990c90 *R/pffr.R 6ec53d1271d9708bd4d5eefcd88efe6d *R/pfr.R c20ddd15fa55c6e88432fc6e43585fb2 *R/pfr_old.R ca16e2f6965f670300cfbc01779d6b19 *R/pi_basis.R @@ -79,7 +79,7 @@ b5e5847b43605f81f0d4a7f89e2af911 *R/plot.fosr.vs.R 9d878231cf9dee0071ade44a6d70f3cc *R/plot.fpcr.R cfb9f89ce8ff988130e55c218eaeb976 *R/plot.lpeer.R 77cdf94d964e56febef584e39c13a14b *R/plot.peer.R -03bb19c7f5fab079f9e8cef40770d53c *R/plot.pfr.R +36365b607b14ff60c7f721d709a926de *R/plot.pfr.R c969d9f72fd6d62855aef789faafce53 *R/poridge.R 24968d3466ceba2286b1c656653ca3c9 *R/postprocess.pfr.R dc153c771713f874d978c26ef3e633eb *R/predict.fbps.R @@ -136,7 +136,7 @@ d3fd98f4418925932eb7424741371b85 *man/f_sum4.Rd be02262fa89556791e100642ce1b43d2 *man/f_trace.Rd 2f2dc572a9523a743cfd970312c11aca *man/fbps.Rd 983508a628b33d3fdd619eb0802c2596 *man/ff.Rd -038c26529b691720ab87bef657235cb9 *man/ffpc.Rd +575dde02f7cbcd67a98e63be79d10d62 *man/ffpc.Rd f84e1a0ade8af6ff124405a32857efbd *man/ffpcplot.Rd c51ae9d3445f98caf851d11fbfa6d771 *man/fgam.Rd 00588c383abb8313141e78db0a6bd030 *man/fosr.Rd @@ -171,13 +171,13 @@ dca002e0a13860f4c041f4c6951ddeb3 *man/model.matrix.pffr.Rd da1df1f46bcc8eae50c29ae4742ae4a8 *man/pcre.Rd 3a15a08fd6470d116521ad85e22d710d *man/peer.Rd a91d3dacb5be61666a6a197394b0b4ee *man/peer_old.Rd -f70171bcb8975f7ca083621ce9a48c90 *man/pffr.Rd +5b258b1bff5dbd59b2f8b0032a047106 *man/pffr.Rd 397f27d06014db23a438e4238ce47cd1 *man/pffr.check.Rd c8ec2f1a933191e399a0e92ccfa0f86b *man/pffrGLS.Rd 6d6d5df970f7a5981ba66c09e305d9c3 *man/pffrSim.Rd 75830d70ae7f4412f4dead6413be70a6 *man/pfr.Rd 5aa5d30f2ecffcd6b908ae09a399bab0 *man/pfr_old.Rd -87c31cf4885f5a83981b049d98489285 *man/pfr_plot.gam.Rd +0ee86d52b3088e51fbe0a9466385dfaf *man/pfr_plot.gam.Rd 7aa64640f1eb0bb496b5e0f16b0fdf9e *man/plot.fosr.Rd d3930765745734c125046717177fbfda *man/plot.fosr.vs.Rd 5cd8d657949646f99b103378d422e1c1 *man/plot.fpcr.Rd @@ -196,8 +196,6 @@ d520fc399d537aa0c2d2a50142f7fcd5 *man/predict.fosr.Rd aa2b0f6ed709c7653be426c2f9340794 *man/qq.pffr.Rd 8fe2dac6c39388810494ff7e05297f02 *man/quadWeights.Rd c4976cf030cd5210c1922b6aeb3c42ea *man/re.Rd -aa9973bb933fa3b1e8b962406271303a *man/refund-internal.Rd -0f825b85c6afa166407d441127f9d442 *man/refund-package.Rd 25501a6d7edd07e7f914cd06414767c9 *man/residuals.pffr.Rd fcdcf1ecea47fded75c171d0d16a339f *man/rlrt.pfr.Rd f778a4a5b2a11c6a240c441f43adb368 *man/sff.Rd diff --git a/R/pffr-ffpc.R b/R/pffr-ffpc.R index 30c75ab..daaa528 100755 --- a/R/pffr-ffpc.R +++ b/R/pffr-ffpc.R @@ -67,7 +67,7 @@ #' layout(t(1:3)) #' persp(t, s, t(beta.st), theta=50, phi=40, main="Truth", #' ticktype="detailed") -#' plot(m.ff, select=1, pers=TRUE, zlim=range(beta.st), theta=50, phi=40, +#' plot(m.ff, select=1, zlim=range(beta.st), theta=50, phi=40, #' ticktype="detailed") #' title(main="ff()") #' ffpcplot(m.pc, type="surf", auto.layout=FALSE, theta = 50, phi = 40) diff --git a/R/pffr.R b/R/pffr.R index 3f737a8..6f23a7e 100644 --- a/R/pffr.R +++ b/R/pffr.R @@ -188,7 +188,7 @@ #' s <- attr(data1, "xindex") #' m1 <- pffr(Y ~ ff(X1, xind=s), yind=t, data=data1) #' summary(m1) -#' plot(m1, pers=TRUE, pages=1) +#' plot(m1, pages=1) #' #' \dontrun{ #' ############################################################################### @@ -206,7 +206,7 @@ #' yind=t, #' data=data2) #' summary(m2) -#' plot(m2, pers=TRUE) +#' plot(m2) #' str(coef(m2)) #' # convenience functions: #' preddata <- pffrSim(scenario="all", n=20) @@ -224,7 +224,7 @@ #' t <- attr(data3, "yindex") #' m3.sparse <- pffr(Y ~ s(xsmoo), data=data3$data, ydata=data3$ydata, yind=t) #' summary(m3.sparse) -#' plot(m3.sparse, pers=TRUE, pages=1) +#' plot(m3.sparse,pages=1) #' } pffr <- function( formula, diff --git a/R/plot.pfr.R b/R/plot.pfr.R index 11e93cc..dc42883 100644 --- a/R/plot.pfr.R +++ b/R/plot.pfr.R @@ -53,7 +53,7 @@ plot.pfr <- function(x, Qtransform=FALSE, ...) { #' @seealso \code{\link[mgcv]{plot.gam}} #' @keywords internal pfr_plot.gam <- function (x, residuals = FALSE, rug = TRUE, se = TRUE, pages = 0, - select = NULL, scale = -1, n = 100, n2 = 40, n3=3, pers = FALSE, + select = NULL, scale = -1, n = 100, n2 = 40, n3=3, theta = 30, phi = 30, jit = FALSE, xlab = NULL, ylab = NULL, main = NULL, ylim = NULL, xlim = NULL, too.far = 0.1, all.terms = FALSE, shade = FALSE, shade.col = "gray80", shift = 0, trans = I, @@ -142,7 +142,7 @@ pfr_plot.gam <- function (x, residuals = FALSE, rug = TRUE, se = TRUE, pages = 0 attr(x$smooth[[i]], "coefficients") <- x$coefficients[first:last] P <- plot(x$smooth[[i]], P = NULL, data = x$model, partial.resids = partial.resids, rug = rug, se = se, - scale = scale, n = n, n2 = n2, pers = pers, theta = theta, + scale = scale, n = n, n2 = n2, theta = theta, phi = phi, jit = jit, xlab = xlab, ylab = ylab, main = main, label = term.lab, ylim = ylim, xlim = xlim, too.far = too.far, shade = shade, shade.col = shade.col, @@ -301,7 +301,7 @@ pfr_plot.gam <- function (x, residuals = FALSE, rug = TRUE, se = TRUE, pages = 0 i == select)) { plot(x$smooth[[i]], P = pd[[i]], partial.resids = partial.resids, rug = rug, se = se, scale = scale, n = n, n2 = n2, - pers = pers, theta = theta, phi = phi, jit = jit, + theta = theta, phi = phi, jit = jit, xlab = xlab, ylab = ylab, main = main, ylim = ylim, xlim = xlim, too.far = too.far, shade = shade, shade.col = shade.col, shift = shift, trans = trans, @@ -336,7 +336,7 @@ pfr_plot.gam <- function (x, residuals = FALSE, rug = TRUE, se = TRUE, pages = 0 #' @keywords internal plot.mgcv.smooth <- function (x, P = NULL, data = NULL, label = "", se1.mult = 1, se2.mult = 2, partial.resids = FALSE, rug = TRUE, se = TRUE, - scale = -1, n = 100, n2 = 40, pers = FALSE, theta = 30, phi = 30, + scale = -1, n = 100, n2 = 40, theta = 30, phi = 30, jit = FALSE, xlab = NULL, ylab = NULL, main = NULL, ylim = NULL, xlim = NULL, too.far = 0.1, shade = FALSE, shade.col = "gray80", shift = 0, trans = I, by.resids = FALSE, scheme = 0, ...) { @@ -625,8 +625,6 @@ plot.mgcv.smooth <- function (x, P = NULL, data = NULL, label = "", se1.mult = 1 } else if (x$dim == 2) { P$fit[P$exclude] <- NA - if (pers) - scheme <- 1 if (scheme == 1) { persp(P$x, P$y, matrix(trans(P$fit + shift), n2, n2), xlab = P$xlab, ylab = P$ylab, zlab = P$main, @@ -692,8 +690,6 @@ plot.mgcv.smooth <- function (x, P = NULL, data = NULL, label = "", se1.mult = 1 P$fit[P$exclude] <- NA if (!is.null(main)) P$title <- main - if (pers) - scheme <- 1 if (scheme == 1) { persp(P$x, P$y, matrix(trans(P$fit + shift), n2, n2), xlab = P$xlab, ylab = P$ylab, zlab = P$main, diff --git a/man/Predict.matrix.pcre.random.effect.Rd b/man/Predict.matrix.pcre.random.effect.Rd old mode 100755 new mode 100644 diff --git a/man/coef.pffr.Rd b/man/coef.pffr.Rd old mode 100755 new mode 100644 diff --git a/man/coefboot.pffr.Rd b/man/coefboot.pffr.Rd old mode 100755 new mode 100644 diff --git a/man/expand.call.Rd b/man/expand.call.Rd old mode 100755 new mode 100644 diff --git a/man/ff.Rd b/man/ff.Rd old mode 100755 new mode 100644 diff --git a/man/ffpc.Rd b/man/ffpc.Rd old mode 100755 new mode 100644 index 7a24ae1..6a80dda --- a/man/ffpc.Rd +++ b/man/ffpc.Rd @@ -89,7 +89,7 @@ all.equal(fitted(m.pc), fitted(m.ff)) layout(t(1:3)) persp(t, s, t(beta.st), theta=50, phi=40, main="Truth", ticktype="detailed") -plot(m.ff, select=1, pers=TRUE, zlim=range(beta.st), theta=50, phi=40, +plot(m.ff, select=1, zlim=range(beta.st), theta=50, phi=40, ticktype="detailed") title(main="ff()") ffpcplot(m.pc, type="surf", auto.layout=FALSE, theta = 50, phi = 40) diff --git a/man/ffpcplot.Rd b/man/ffpcplot.Rd old mode 100755 new mode 100644 diff --git a/man/model.matrix.pffr.Rd b/man/model.matrix.pffr.Rd old mode 100755 new mode 100644 diff --git a/man/pcre.Rd b/man/pcre.Rd old mode 100755 new mode 100644 diff --git a/man/pffr.Rd b/man/pffr.Rd index 0ca20ce..3783caa 100644 --- a/man/pffr.Rd +++ b/man/pffr.Rd @@ -203,7 +203,7 @@ t <- attr(data1, "yindex") s <- attr(data1, "xindex") m1 <- pffr(Y ~ ff(X1, xind=s), yind=t, data=data1) summary(m1) -plot(m1, pers=TRUE, pages=1) +plot(m1, pages=1) \dontrun{ ############################################################################### @@ -221,7 +221,7 @@ m2 <- pffr(Y ~ ff(X1, xind=s) + #linear function-on-function yind=t, data=data2) summary(m2) -plot(m2, pers=TRUE) +plot(m2) str(coef(m2)) # convenience functions: preddata <- pffrSim(scenario="all", n=20) @@ -239,7 +239,7 @@ data3 <- pffrSim(scenario=c("int", "smoo"), n=100, propmissing=0.8) t <- attr(data3, "yindex") m3.sparse <- pffr(Y ~ s(xsmoo), data=data3$data, ydata=data3$ydata, yind=t) summary(m3.sparse) -plot(m3.sparse, pers=TRUE, pages=1) +plot(m3.sparse,pages=1) } } \references{ diff --git a/man/pffrGLS.Rd b/man/pffrGLS.Rd old mode 100755 new mode 100644 diff --git a/man/pffrSim.Rd b/man/pffrSim.Rd old mode 100755 new mode 100644 diff --git a/man/pfr_plot.gam.Rd b/man/pfr_plot.gam.Rd index c8f7a93..13b2c19 100644 --- a/man/pfr_plot.gam.Rd +++ b/man/pfr_plot.gam.Rd @@ -17,7 +17,6 @@ pfr_plot.gam( n = 100, n2 = 40, n3 = 3, - pers = FALSE, theta = 30, phi = 30, jit = FALSE, @@ -52,7 +51,6 @@ pfr_plot.gam( scale = -1, n = 100, n2 = 40, - pers = FALSE, theta = 30, phi = 30, jit = FALSE, @@ -85,7 +83,6 @@ pfr_plot.gam( n = 100, n2 = 40, n3 = 3, - pers = FALSE, theta = 30, phi = 30, jit = FALSE, diff --git a/man/plot.pffr.Rd b/man/plot.pffr.Rd old mode 100755 new mode 100644 diff --git a/man/predict.pffr.Rd b/man/predict.pffr.Rd old mode 100755 new mode 100644 diff --git a/man/print.summary.pffr.Rd b/man/print.summary.pffr.Rd old mode 100755 new mode 100644 diff --git a/man/quadWeights.Rd b/man/quadWeights.Rd old mode 100755 new mode 100644 diff --git a/man/re.Rd b/man/re.Rd old mode 100755 new mode 100644 diff --git a/man/refund-internal.Rd b/man/refund-internal.Rd deleted file mode 100644 index d689f35..0000000 --- a/man/refund-internal.Rd +++ /dev/null @@ -1,28 +0,0 @@ -\name{refund-internal} -\alias{fpcr.setup} -\alias{first.last_test} -\alias{getSpandDist} -\alias{getNPC.DonohoGavish} -\alias{imwd_test} -\alias{osplinepen2d} -\alias{Omegas} -\alias{lw.test} -\alias{safeDeparse} -\alias{getShrtlbls} -\alias{list2df} -\alias{preprocess.pfr} -\alias{postprocess.pfr} -\alias{parse.predict.pfr} -\alias{Predict.matrix.pss.smooth} -\alias{checkError} -\alias{getRsq} -\alias{decorrelate} -\alias{pspline.setting} -\alias{irreg2mat} -%- Also NEED an '\alias' for EACH other topic documented here. -\title{ -Internal functions for the refund package -} -\description{ -These functions are ordinarily not to be called by the user, but if you contact the package authors with any questions about them, we'll do our best to clarify matters.} - diff --git a/man/refund-package.Rd b/man/refund-package.Rd deleted file mode 100644 index f5aacb4..0000000 --- a/man/refund-package.Rd +++ /dev/null @@ -1,24 +0,0 @@ -\name{refund-package} -\Rdversion{1.1} -\alias{refund-package} -\alias{refund} -\docType{package} -\title{ -Regression with Functional Data -} -\description{ -Methods for regression with functional data. Various approaches to regression with scalar responses and functional predictors are implemented by \code{\link{pfr}}, \code{\link{peer}}, \code{\link{lpeer}} and \code{\link{fpcr}}. For regression with functional responses, see \code{\link{pffr}}, \code{\link{fosr}}, and \code{\link{fosr2s}}.} -\details{For a complete list of functions type \code{library(help=refund)}. -} - -\author{ -\emph{Authors:} -Jeff Goldsmith \email{jeff.goldsmith@columbia.edu}, Fabian Scheipl \email{fabian.scheipl@stat.uni-muenchen.de}, Lei Huang \email{huangracer@gmail.com}, Julia Wrobel \email{jw3134@cumc.columbia.edu}, Jonathan Gellar \email{jgellar1@jhu.edu}, Jaroslaw Harezlak, Mathew W. McLean \email{mathew.w.mclean@gmail.com}, Bruce Swihart \email{bswihart@jhsph.edu}, Luo Xiao \email{lxiao@jhsph.edu}, Ciprian Crainiceanu \email{ccrainic@jhsph.edu}, Philip Reiss \email{phil.reiss@nyumc.org}. - - -\emph{Contributors:} -Yakuan Chen, Sonja Greven, Lan Huo, Madan Gopal Kundu, Ana-Maria Staicu, David L. Miller, So Young Park - -\emph{Maintainer:} Lei Huang \email{huangracer@gmail.com} -} -\keyword{ package } diff --git a/man/sff.Rd b/man/sff.Rd old mode 100755 new mode 100644 diff --git a/man/smooth.construct.pcre.smooth.spec.Rd b/man/smooth.construct.pcre.smooth.spec.Rd old mode 100755 new mode 100644 diff --git a/man/smooth.construct.pss.smooth.spec.Rd b/man/smooth.construct.pss.smooth.spec.Rd old mode 100755 new mode 100644 diff --git a/man/summary.pffr.Rd b/man/summary.pffr.Rd old mode 100755 new mode 100644