[[PageOutline]] = Package GrzLinModel = Max-likelihood and bayesian estimation of [http://en.wikipedia.org/wiki/Generalized_linear_model generalized linear models]. == Weighted Generalized Regresions == Abstract class [source:/tolp/OfficialTolArchiveNetwork/GrzLinModel/WgtReg.tol @WgtReg] is the base to inherit weighted generalized linear regressions as poisson, binomial, normal or any other, given just the scalar link function [[LatexEquation( g )]] and the density function [[LatexEquation( f )]]. For boolean and qualitative response outputs like logit or probit there is an specialization on package [wiki:OfficialTolArchiveNetworkQltvRespModel QltvRespModel] 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 * [[LatexEquation( X\in\mathbb{R}^{m\times n} )]] the regression input matrix * [[LatexEquation( w\in\mathbb{R}^{m} )]] the vector of weights of each register * [[LatexEquation( y\in\mathbb{R}^{m} )]] the regression output matrix * [[LatexEquation( \beta\in\mathbb{R}^{n} )]] the regression coefficients * [[LatexEquation( \eta=X\beta\in\mathbb{R}^{n} )]] the linear prediction * [[LatexEquation( g )]] the link function * [[LatexEquation( f)]] the density function of a distribution of the [http://en.wikipedia.org/wiki/Exponential_family exponential family] Then we purpose that the average of the output is the inverse of the link function applyied to the linear predictor [[LatexEquation( 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 [[LatexEquation( f\left(y_{k};\mu_{k}\right) )]] the output [[LatexEquation( y_k )]] and the average [[LatexEquation( \mu_{k}=g^{-1}\left(\eta_{k}\right)=g^{-1}\left(x_{k}\beta\right) )]] for each row [[LatexEquation( k=1 \dots n)]]: If there are more unknown parameters about the density we will supose === Weighted Poisson Regresion ===