CRAN Package Check Results for Package cgam

Last updated on 2025-03-28 08:54:16 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.23 31.20 147.37 178.57 ERROR
r-devel-linux-x86_64-debian-gcc 1.23 19.00 97.47 116.47 ERROR
r-devel-linux-x86_64-fedora-clang 1.23 333.63 OK
r-devel-linux-x86_64-fedora-gcc 1.23 292.72 OK
r-devel-macos-arm64 1.23 67.00 OK
r-devel-macos-x86_64 1.23 236.00 OK
r-devel-windows-x86_64 1.23 31.00 151.00 182.00 OK
r-patched-linux-x86_64 1.23 30.37 156.43 186.80 OK
r-release-linux-x86_64 1.23 29.83 153.64 183.47 NOTE
r-release-macos-arm64 1.23 74.00 NOTE
r-release-macos-x86_64 1.23 183.00 NOTE
r-release-windows-x86_64 1.23 29.00 162.00 191.00 NOTE
r-oldrel-macos-arm64 1.23 70.00 NOTE
r-oldrel-macos-x86_64 1.23 193.00 NOTE
r-oldrel-windows-x86_64 1.23 40.00 198.00 238.00 NOTE

Check Details

Version: 1.23
Check: examples
Result: ERROR Running examples in ‘cgam-Ex.R’ failed The error most likely occurred in: > base::assign(".ptime", proc.time(), pos = "CheckExEnv") > ### Name: cgam > ### Title: Constrained Generalized Additive Model Fitting > ### Aliases: cgam > ### Keywords: cgam routine > > ### ** Examples > > # Example 1. > data(cubic) > # extract x > x <- cubic$x > > # extract y > y <- cubic$y > > # regress y on x with no restriction with lm() > fit.lm <- lm(y ~ x + I(x^2) + I(x^3)) > > # regress y on x under the restriction: "increasing and convex" > fit.cgam <- cgam(y ~ incr.conv(x)) > > # make a plot to compare the two fits > par(mar = c(4, 4, 1, 1)) > plot(x, y, cex = .7, xlab = "x", ylab = "y") > lines(x, fit.cgam$muhat, col = 2, lty = 2) > lines(x, fitted(fit.lm), col = 1, lty = 1) > legend("topleft", bty = "n", c("constrained cgam fit", "unconstrained lm fit"), + lty = c(2, 1), col = c(2, 1)) > > # Example 2. > ## Not run: > ##D library(gam) > ##D data(kyphosis) > ##D > ##D # regress Kyphosis on Age, Number, and Start under the restrictions: > ##D # "concave", "increasing and concave", and "decreasing and concave" > ##D fit <- cgam(Kyphosis ~ conc(Age) + incr.conc(Number) + decr.conc(Start), > ##D family = binomial(), data = kyphosis) > ## End(Not run) > > # Example 3. > library(MASS) > data(Rubber) > > # regress loss on hard and tens under the restrictions: > # "decreasing" and "decreasing" > fit.cgam <- cgam(loss ~ decr(hard) + decr(tens), data = Rubber) > # "smooth and decreasing" and "smooth and decreasing" > fit.cgam.s <- cgam(loss ~ s.decr(hard) + s.decr(tens), data = Rubber) > summary(fit.cgam.s) Call: cgam(formula = loss ~ s.decr(hard) + s.decr(tens), data = Rubber) Coefficients: Estimate StdErr t.value p.value (Intercept) 175.4333 5.9624 29.423 < 2.2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 (Dispersion parameter for gaussian family taken to be 606.8062) Null deviance: 225011.4 on 29 degrees of freedom Residual deviance: 17597.38 on 16.5 observed degrees of freedom Approximate significance of constrained components: edf mixture.of.Beta p.value s.decr(hard) 7.5 0.8772 < 2.2e-16 *** s.decr(tens) 4.5 0.8166 < 2.2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 CIC: 10.0851> anova(fit.cgam.s) Family: gaussian Link function: identity Formula: cgam(formula = loss ~ s.decr(hard) + s.decr(tens), data = Rubber) Approximate significance of smooth terms: edf mixture.of.Beta p.value s.decr(hard) 7.5 0.8772 < 2.2e-16 *** s.decr(tens) 4.5 0.8166 < 2.2e-16 *** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > > # make a 3D plot based on fit.cgam and fit.cgam.s > plotpersp(fit.cgam, th = 120, main = "3D Plot of a Cgam Fit") > plotpersp(fit.cgam.s, tens, hard, data = Rubber, th = 120, main = "3D Plot of a Smooth Cgam Fit") > > # Example 4. monotonic variance estimation > n <- 400 > x <- runif(n) > sig <- .1 + exp(15*x-8)/(1+exp(15*x-8)) > e <- rnorm(n) > mu <- 10*x^2 > y <- mu + sig*e > > fit <- cgam(y ~ s.incr.conv(x), var.est = s.incr(x)) > est.var <- fit$vh > muhat <- fit$muhat > > par(mfrow = c(1, 2)) > plot(x, y) > points(sort(x), muhat[order(x)], type = "l", lwd = 2, col = 2) > lines(sort(x), (mu)[order(x)], col = 4) > > plot(sort(x), est.var[order(x)], col=2, lwd=2, type="l", + lty=2, ylab="Variance", ylim=c(0, max(c(est.var, sig^2)))) > points(sort(x), (sig^2)[order(x)], col=1, lwd=2, type="l") > > # Example 5. monotonic variance estimation with the lidar data set in SemiPar > library(SemiPar) > data(lidar) > > fit <- cgam(logratio ~ s.decr(range), var.est=s.incr(range), data=lidar) Error in attr(x, "nm") <- deparse(pars$x) : cannot set attribute on a 'builtin' Calls: cgam -> cgam.fit -> s.incr Execution halted Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc

Version: 1.23
Check: package dependencies
Result: NOTE Depends: includes the non-default packages: 'coneproj', 'svDialogs', 'statmod', 'lme4', 'Matrix', 'splines2' Adding so many packages to the search path is excessive and importing selectively is preferable. Flavors: r-release-linux-x86_64, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64