Learn R Programming

plsRbeta (version 0.3.0)

PLS_beta: Partial least squares beta regression models

Description

This function implements Partial least squares beta regression models on complete or incomplete datasets.

Usage

PLS_beta(
  dataY,
  dataX,
  nt = 2,
  limQ2set = 0.0975,
  dataPredictY = dataX,
  modele = "pls",
  family = NULL,
  typeVC = "none",
  EstimXNA = FALSE,
  scaleX = TRUE,
  scaleY = NULL,
  pvals.expli = FALSE,
  alpha.pvals.expli = 0.05,
  MClassed = FALSE,
  tol_Xi = 10^(-12),
  weights,
  method,
  sparse = FALSE,
  sparseStop = TRUE,
  naive = FALSE,
  link = NULL,
  link.phi = NULL,
  type = "ML",
  verbose = TRUE
)

Value

Depends on the model that was used to fit the model.

Arguments

dataY

response (training) dataset

dataX

predictor(s) (training) dataset

nt

number of components to be extracted

limQ2set

limit value for the Q2

dataPredictY

predictor(s) (testing) dataset

modele

name of the PLS glm or PLS beta model to be fitted ("pls", "pls-glm-Gamma", "pls-glm-gaussian", "pls-glm-inverse.gaussian", "pls-glm-logistic", "pls-glm-poisson", "pls-glm-polr", "pls-beta"). Use "modele=pls-glm-family" to enable the family option.

family

a description of the error distribution and link function to be used in the model. This can be a character string naming a family function, a family function or the result of a call to a family function. (See family for details of family functions.) To use the family option, please set modele="pls-glm-family". User defined families can also be defined. See details.

typeVC

type of leave one out cross validation. For back compatibility purpose.

list("none")

no cross validation

list("standard")

no cross validation

list("missingdata")

no cross validation

list("adaptative")

no cross validation

EstimXNA

only for modele="pls". Set whether the missing X values have to be estimated.

scaleX

scale the predictor(s) : must be set to TRUE for modele="pls" and should be for glms pls.

scaleY

scale the response : Yes/No. Ignored since not always possible for glm responses.

pvals.expli

should individual p-values be reported to tune model selection ?

alpha.pvals.expli

level of significance for predictors when pvals.expli=TRUE

MClassed

number of missclassified cases, should only be used for binary responses

tol_Xi

minimal value for Norm2(Xi) and \(\mathrm{det}(pp' \times pp)\) if there is any missing value in the dataX. It defaults to \(10^{-12}\)

weights

an optional vector of 'prior weights' to be used in the fitting process. Should be NULL or a numeric vector.

method

the link function for pls-glm-polr, logistic, probit, complementary log-log or cauchit (corresponding to a Cauchy latent variable).

sparse

should the coefficients of non-significant predictors (<alpha.pvals.expli) be set to 0

sparseStop

should component extraction stop when no significant predictors (<alpha.pvals.expli) are found

naive

use the naive estimates for the Degrees of Freedom in plsR? Default is FALSE.

link

character specification of the link function in the mean model (mu). Currently, "logit", "probit", "cloglog", "cauchit", "log", "loglog" are supported. Alternatively, an object of class "link-glm" can be supplied.

link.phi

character specification of the link function in the precision model (phi). Currently, "identity", "log", "sqrt" are supported. The default is "log" unless formula is of type y~x where the default is "identity" (for backward compatibility). Alternatively, an object of class "link-glm" can be supplied.

type

character specification of the type of estimator. Currently, maximum likelihood ("ML"), ML with bias correction ("BC"), and ML with bias reduction ("BR") are supported.

verbose

should info messages be displayed ?

Details

There are seven different predefined models with predefined link functions available :

list("\"pls\"")

ordinary pls models

list("\"pls-glm-Gamma\"")

glm gaussian with inverse link pls models

list("\"pls-glm-gaussian\"")

glm gaussian with identity link pls models

list("\"pls-glm-inverse-gamma\"")

glm binomial with square inverse link pls models

list("\"pls-glm-logistic\"")

glm binomial with logit link pls models

list("\"pls-glm-poisson\"")

glm poisson with log link pls models

list("\"pls-glm-polr\"")

glm polr with logit link pls models

Using the "family=" option and setting "modele=pls-glm-family" allows changing the family and link function the same way as for the glm function. As a consequence user-specified families can also be used.

The

accepts the links (as names) identity, log and inverse.

list("gaussian")

accepts the links (as names) identity, log and inverse.

family

accepts the links (as names) identity, log and inverse.

The

accepts the links logit, probit, cauchit, (corresponding to logistic, normal and Cauchy CDFs respectively) log and cloglog (complementary log-log).

list("binomial")

accepts the links logit, probit, cauchit, (corresponding to logistic, normal and Cauchy CDFs respectively) log and cloglog (complementary log-log).

family

accepts the links logit, probit, cauchit, (corresponding to logistic, normal and Cauchy CDFs respectively) log and cloglog (complementary log-log).

The

accepts the links inverse, identity and log.

list("Gamma")

accepts the links inverse, identity and log.

family

accepts the links inverse, identity and log.

The

accepts the links log, identity, and sqrt.

list("poisson")

accepts the links log, identity, and sqrt.

family

accepts the links log, identity, and sqrt.

The

accepts the links 1/mu^2, inverse, identity and log.

list("inverse.gaussian")

accepts the links 1/mu^2, inverse, identity and log.

family

accepts the links 1/mu^2, inverse, identity and log.

The

accepts the links logit, probit, cloglog, identity, inverse, log, 1/mu^2 and sqrt.

list("quasi")

accepts the links logit, probit, cloglog, identity, inverse, log, 1/mu^2 and sqrt.

family

accepts the links logit, probit, cloglog, identity, inverse, log, 1/mu^2 and sqrt.

The function

can be used to create a power link function.

list("power")

can be used to create a power link function.

The default estimator for Degrees of Freedom is the Kramer and Sugiyama's one which only works for classical plsR models. For these models, Information criteria are computed accordingly to these estimations. Naive Degrees of Freedom and Information Criteria are also provided for comparison purposes. For more details, see Kraemer, N., Sugiyama M. (2010). "The Degrees of Freedom of Partial Least Squares Regression". preprint, http://arxiv.org/abs/1002.4112.

References

Frédéric Bertrand, Nicolas Meyer, Michèle Beau-Faller, Karim El Bayed, Izzie-Jacques Namer, Myriam Maumy-Bertrand (2013). Régression Bêta PLS. Journal de la Société Française de Statistique, 154(3):143-159. http://publications-sfds.math.cnrs.fr/index.php/J-SFdS/article/view/215

See Also

PLS_beta_wvc and PLS_beta_kfoldcv

Examples

Run this code


data("GasolineYield",package="betareg")
yGasolineYield <- GasolineYield$yield
XGasolineYield <- GasolineYield[,2:5]
modpls <- PLS_beta(yGasolineYield,XGasolineYield,nt=3,modele="pls-beta")
modpls$pp
modpls$Coeffs
modpls$Std.Coeffs
modpls$InfCrit
modpls$PredictY[1,]
rm("modpls")


Run the code above in your browser using DataLab