                              Package ‘spinyReg’
                                           October 14, 2022
Type Package
Title Sparse Generative Model and Its EM Algorithm
Version 0.1-0
Date 2015-09-05
Author Charles Bouveyron, Julien Chiquet, Pierre Latouche, Pierre-Alexandre
      Mattei
Maintainer Julien Chiquet <julien.chiquet@gmail.com>
Description Implements a generative model that uses a
      spike-and-slab like prior distribution obtained by multiplying a
      deterministic binary vector. Such a model allows an EM algorithm,
      optimizing a type-II log-likelihood.
License GPL (>= 2)
Imports methods
Repository CRAN
Repository/R-Forge/Project spinyreg
Repository/R-Forge/Revision 11
Repository/R-Forge/DateTimeStamp 2015-09-07 10:50:53
Date/Publication 2015-09-07 18:18:03
NeedsCompilation no
R topics documented:
         spinyReg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .   2
         spinyreg-class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Index                                                                                                   4
                                                    1
2                                                                                               spinyReg
  spinyReg                      spinyReg
Description
    Computethe path of solution of a spinyReg fit.
Usage
    spinyreg(X, Y, alpha = 0.1, gamma = 1, z = rep(1, ncol(X)),
      intercept = TRUE, normalize = TRUE, verbose = 1, recovery = TRUE,
      maxit = 1000, eps = 1e-10)
Arguments
    X                   matrix of features. Do NOT include intercept.
    Y                   matrix of responses.
    alpha               numeric scalar; prior value for the alpha parameter (see the model’s details).
                        Default is 0.1.
    gamma               numeric scalar; prior value for the gamma parameter (see the model’s details).
                        Default is 1.
    z                   numeric vector; prior support of active variable. Default is rep(1,p), meaning
                        all variable activated
    intercept           logical; indicates if a vector of intercepts should be included in the model. De-
                        fault is TRUE.
    normalize           logical; indicates if predictor variables should be normalized to have unit L2
                        norm before fitting. Default is TRUE.
    verbose             integer; activate verbose mode from ’0’ (nothing) to ’2’ (detailed output).
                        should be included in the model. Default is TRUE.
    recovery            logical; indicates if the full path of models should be inspected for model selec-
                        tion. Default is TRUE.
    maxit               integer; the maximal number of iteration (i.e. number of alternated optimization
                        between each parameter) in the Expectation/Maximization algorithm.
    eps                 a threshold for convergence. Default is 1e-10.
Value
    an object with class spinyreg, see the documentation page spinyreg for details.
See Also
    See also spinyreg.
spinyreg-class                                                                                     3
Examples
     ## Not run:
     data <- read.table(file="http://statweb.stanford.edu/~tibs/ElemStatLearn/datasets/prostate.data")
     x <- data[, 1:8]
     y <- data[, 9]
     out <- spinyreg(x,y,verbose=2)
     ## End(Not run)
   spinyreg-class                Class "spinyreg"
Description
     Class of object returned by the spinyreg function.
Slots
     coefficients: numeric vector of coefficients with respect to the original input. Contains the
           intercept if the model owns any.
     alpha: numeric scalar.
     gamma: numeric scalar.
     normx: Vector (class "numeric") containing the square root of the sum of squares of each column
           of the design matrix.
     residuals: Vector of residuals.
     r.squared: scalar giving the coefficient of determination.
     fitted: Vector of fitted values.
     monitoring: List (class "list") which contains various indicators dealing with the optimization
           process.
     intercept: Logical which indicates if a intercept is included in the model.
Methods
     This class comes with the usual predict(object, newx, ...), fitted(object, ...), residuals(object,
     ...), coefficients(object, ...), print(object, ...) and show(object) generic (undocu-
     mented) methods.
Index
∗ class
     spinyreg-class, 3
∗ models,
     spinyReg, 2
∗ regression
     spinyReg, 2
coefficients,spinyreg-method
          (spinyreg-class), 3
fitted,spinyreg-method
          (spinyreg-class), 3
predict,spinyreg-method
          (spinyreg-class), 3
print,spinyreg-method (spinyreg-class),
          3
residuals,spinyreg-method
          (spinyreg-class), 3
show,spinyreg-method (spinyreg-class), 3
spinyReg, 2
spinyreg, 2
spinyreg (spinyReg), 2
spinyreg-class, 3
                                         4
