close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Version 5 (modified by Víctor de Buen Remiro, 14 years ago) (diff)

--

Package GrzLinModel

Max-likelihood and bayesian estimation of generalized linear models.

Weighted Generalized Regresions

Abstract class GrzLinModel::@WgtReg is the base to inherit weighted generalized linear regressions as poisson, binomial, normal or any other, given just the scalar link function  g and the density function  f .

In a weighted regression each row of input data has a distinct weight in the likelihood function. For example, it can be very usefull to handle with data extrated from an stratified sample.

Let be

  •  X\in\mathbb{R}^{m\times n} the regression input matrix
  •  w\in\mathbb{R}^{m} the vector of weights of each register
  •  y\in\mathbb{R}^{m} the regression output matrix
  •  \beta\in\mathbb{R}^{n} the regression coefficients
  •  \eta=X\beta\in\mathbb{R}^{n} the linear prediction
  •  g the link function
  •  f the density function of a distribution of the exponential family

Then we purpose that the average of the output is the inverse of the link function applyied to the linear predictor

 E\left[y\right]=\mu=g^{-1}\left(X\beta\right)

The density function becomes as a real valuated function of at least two parameters

 f\left(y_{k};\mu_{k}\right)

the output  y_k and the average

 \mu_{k}=g^{-1}\left(\eta_{k}\right)=g^{-1}\left(x_{k}\beta\right)

for each row  k=1 \dots  n:

Weighted Normal Regresion

Is implemented in GrzLinModel::@WgtNormal There is a sample of use in test_0001/test.tol

Weighted Poisson Regresion

It will be implemented in GrzLinModel::@WgtPoisson but is not available yet.

Weighted Qualitative Regresion

For boolean and qualitative response outputs like logit or probit there is an specialization on package QltvRespModel