CRAN Package Check Results for Maintainer ‘Kenji Kondo <kkondo.odnokk at gmail.com>’

Last updated on 2022-01-23 18:51:25 CET.

Package ERROR NOTE OK
aglm 1 5 7

Package aglm

Current CRAN status: ERROR: 1, NOTE: 5, OK: 7

Version: 0.4.0
Check: dependencies in R code
Result: NOTE
    Namespace in Imports field not imported from: ‘mathjaxr’
     All declared Imports should be used.
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-devel-windows-x86_64-new-TK, r-release-macos-arm64, r-release-macos-x86_64, r-oldrel-macos-x86_64

Version: 0.4.0
Check: package dependencies
Result: NOTE
    Package suggested but not available for checking: 'faraway'
Flavor: r-devel-windows-x86_64-new-TK

Version: 0.4.0
Check: examples
Result: ERROR
    Running examples in 'aglm-Ex.R' failed
    The error most likely occurred in:
    
    > ### Name: aglm
    > ### Title: Fit an AGLM model with no cross-validation
    > ### Aliases: aglm
    >
    > ### ** Examples
    >
    >
    > #################### Gaussian case ####################
    >
    > library(MASS) # For Boston
    > library(aglm)
    >
    > ## Read data
    > xy <- Boston # xy is a data.frame to be processed.
    > colnames(xy)[ncol(xy)] <- "y" # Let medv be the objective variable, y.
    >
    > ## Split data into train and test
    > n <- nrow(xy) # Sample size.
    > set.seed(2018) # For reproducibility.
    > test.id <- sample(n, round(n/4)) # ID numbders for test data.
    > test <- xy[test.id,] # test is the data.frame for testing.
    > train <- xy[-test.id,] # train is the data.frame for training.
    > x <- train[-ncol(xy)]
    > y <- train$y
    > newx <- test[-ncol(xy)]
    > y_true <- test$y
    >
    > ## Fit the model
    > model <- aglm(x, y) # alpha=1 (the default value)
    >
    > ## Predict for various alpha and lambda
    > lambda <- 0.1
    > y_pred <- predict(model, newx=newx, s=lambda)
    > rmse <- sqrt(mean((y_true - y_pred)^2))
    > cat(sprintf("RMSE for lambda=%.2f: %.5f \n\n", lambda, rmse))
    RMSE for lambda=0.10: 4.73502
    
    >
    > lambda <- 1.0
    > y_pred <- predict(model, newx=newx, s=lambda)
    > rmse <- sqrt(mean((y_true - y_pred)^2))
    > cat(sprintf("RMSE for lambda=%.2f: %.5f \n\n", lambda, rmse))
    RMSE for lambda=1.00: 5.70778
    
    >
    > alpha <- 0
    > model <- aglm(x, y, alpha=alpha)
    >
    > lambda <- 0.1
    > y_pred <- predict(model, newx=newx, s=lambda)
    > rmse <- sqrt(mean((y_true - y_pred)^2))
    > cat(sprintf("RMSE for alpha=%.2f and lambda=%.2f: %.5f \n\n", alpha, lambda, rmse))
    RMSE for alpha=0.00 and lambda=0.10: 5.15538
    
    >
    > #################### Binomial case ####################
    >
    > library(aglm)
    > library(faraway)
    Error in library(faraway) : there is no package called 'faraway'
    Execution halted
Flavor: r-devel-windows-x86_64-new-TK