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.

Changes between Version 21 and Version 22 of OfficialTolArchiveNetworkGrzLinModel


Ignore:
Timestamp:
Feb 20, 2012, 11:02:37 AM (13 years ago)
Author:
Víctor de Buen Remiro
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OfficialTolArchiveNetworkGrzLinModel

    v21 v22  
    8080   [[LatexEquation( C\beta \sim N\left(\mu_{C},\Sigma_{C}\right) )]][[BR]]
    8181
    82 === Weighted Normal Regresion ===
    83 
    84 Is implemented in [source:/tolp/OfficialTolArchiveNetwork/GrzLinModel/WgtNormal.tol GrzLinModel::@WgtNormal]
    85 There is an example of use in [source:/tolp/OfficialTolArchiveNetwork/GrzLinModel/test/test_0001/test.tol test_0001/test.tol]
    86 
    87 In this case we have
    88 
    89  * the identity as link function and mean function [[BR]] [[BR]]
    90    [[LatexEquation( \eta = g\left(\mu\right)= \mu = g^{-1}\left(\eta\right) = \eta)]] [[BR]] [[BR]]
    91  * the density function has the variance as extra parameter[[BR]] [[BR]]
    92    [[LatexEquation( f\left(y;\mu,\sigma^{2}\right)=\frac{1}{\sqrt{2\pi\sigma^{2}}}e^{^{-\frac{1}{2}\frac{\left(y-\mu\right)^{2}}{\sigma^{2}}}} )]][[BR]] [[BR]]
    93  * the density function will be then [[BR]] [[BR]]
    94    [[LatexEquation( f\left(y;\mu,\sigma^{2}\right)=\frac{1}{\sqrt{2\pi\sigma^{2}}}e^{^{-\frac{1}{2}\frac{\left(y-\mu\right)^{2}}{\sigma^{2}}}} )]][[BR]] [[BR]]
    95  * the log-density function will be then [[BR]] [[BR]]
    96    [[LatexEquation( \ln f\left(y;\mu,\sigma^{2}\right)= -\frac{1}{2}\ln\left(2\pi\sigma^{2}\right)-\frac{1}{2\sigma^{2}}\left(y}-\mu\right)^{2} )]][[BR]] [[BR]]
    97  * the partial derivatives of log-density function respect to the linear prediction is [[BR]] [[BR]]
    98    [[LatexEquation( \frac{\partial\ln f}{\partial\eta}=\frac{1}{\sigma^{2}}\left(y-\eta\right) )]] [[BR]] [[BR]]
    99    [[LatexEquation( \frac{\partial^{2}\ln f}{\partial\eta^{2}}=-\frac{1}{\sigma^{2}} )]] [[BR]] [[BR]]
    100 
    10182=== Weighted Poisson Regresion ===
    10283
     
    11394   [[LatexEquation( f\left(y;\mu\right)=\frac{1}{y!}e^{-\mu}\mu^{y} )]] [[BR]] [[BR]]
    11495 * and its logarithm will be [[BR]] [[BR]]
    115    [[LatexEquation( \ln f\left(y;\mu\right)=-\ln\left(y!\right)+y\ln\left(\mu\right)-\mu = -\ln\left(y!\right)+y\eta-e^{\eta} )]] [[BR]] [[BR]]
     96   [[LatexEquation( \ln f\left(y;\mu\right)=-\ln\left(\Gamma\left(y+1\right)\right)+y\ln\left(\mu\right)-\mu = -\ln\left(\Gamma\left(y+1\right)\right)+y\eta-e^{\eta} )]] [[BR]] [[BR]]
    11697 * the partial derivatives of log-density function respect to the linear prediction is [[BR]] [[BR]]
    11798   [[LatexEquation( \frac{\partial\ln f}{\partial\eta}=y-e^{\eta} )]] [[BR]] [[BR]]
    11899   [[LatexEquation( \frac{\partial^{2}\ln f}{\partial\eta^{2}}=-e^{\eta} )]] [[BR]] [[BR]]
    119 
    120100
    121101=== Weighted Qualitative Regresion ===
     
    123103For boolean and qualitative response outputs like logit or probit there is an
    124104specialization on package [wiki:OfficialTolArchiveNetworkQltvRespModel QltvRespModel]
     105
     106=== Extended Regressions ===
     107
     108Under certain circumstances, the optimization and simulation methods used
     109over pure exponential family, can be extended to distributions with extra
     110parameters than average.
     111
     112This extra parameters can be simulated in a Gibbs frame by simple alternating
     113and incorporating prior information about all them. In MLE optimization we can
     114use [http://en.wikipedia.org/wiki/Expectation%E2%80%93maximization_algorithm Expectation–maximization algorithm]
     115to take profit of reusing written code.
     116
     117==== Weighted Normal Regresion ====
     118
     119Is implemented in [source:/tolp/OfficialTolArchiveNetwork/GrzLinModel/WgtNormal.tol GrzLinModel::@WgtNormal]
     120There is an example of use in [source:/tolp/OfficialTolArchiveNetwork/GrzLinModel/test/test_0001/test.tol test_0001/test.tol]
     121
     122In this case we have
     123
     124 * the identity as link function and mean function [[BR]] [[BR]]
     125   [[LatexEquation( \eta = g\left(\mu\right)= \mu = g^{-1}\left(\eta\right) = \eta)]] [[BR]] [[BR]]
     126 * the density function has the variance as extra parameter[[BR]] [[BR]]
     127   [[LatexEquation( f\left(y;\mu,\sigma^{2}\right)=\frac{1}{\sqrt{2\pi\sigma^{2}}}e^{^{-\frac{1}{2}\frac{\left(y-\mu\right)^{2}}{\sigma^{2}}}} )]][[BR]] [[BR]]
     128 * we can stablish an optional inverse chi-square prior over the variance or even fix it as a known value.
     129 * the log-density function will be [[BR]] [[BR]]
     130   [[LatexEquation( \ln f\left(y;\mu,\sigma^{2}\right)= -\frac{1}{2}\ln\left(2\pi\sigma^{2}\right)-\frac{1}{2\sigma^{2}}\left(y}-\mu\right)^{2} )]][[BR]] [[BR]]
     131 * the partial derivatives of log-density function respect to the linear prediction is [[BR]] [[BR]]
     132   [[LatexEquation( \frac{\partial\ln f}{\partial\eta}=\frac{1}{\sigma^{2}}\left(y-\eta\right) )]] [[BR]] [[BR]]
     133   [[LatexEquation( \frac{\partial^{2}\ln f}{\partial\eta^{2}}=-\frac{1}{\sigma^{2}} )]] [[BR]] [[BR]]
     134
     135==== Weighted Zero-Inflated Poisson Regresion ====
     136
     137Is implemented in [source:/tolp/OfficialTolArchiveNetwork/GrzLinModel/WgtPoisson.ZeroInflated.tol GrzLinModel::@WgtPoisson.ZeroInflated]
     138There is an example of use in [source:/tolp/OfficialTolArchiveNetwork/GrzLinModel/test/test_0004/test.tol test_0004/test.tol]
     139
     140This a mixture of Bernouilli and Poisson that inflates the probability of zero occurrences in a certain value
     141 
     142[[LatexEquation(\pi\in\left[0,1\right] )]]
     143
     144that will be called zero inflation and will be an extra parameter used to fit overdispersion.
     145
     146When [[LatexEquation(\pi=0 )]] we have a Poisson and when [[LatexEquation(\pi=1 )]] it's a Bernouilli.
     147
     148 * the link function is the same than Poisson one[[BR]] [[BR]]
     149   [[LatexEquation( \eta = g\left(\mu\right)=\ln\left(\mu\right) )]] [[BR]]  [[BR]]
     150 * the mean function is also unchanged [[BR]] [[BR]]
     151   [[LatexEquation( \mu = g^{-1}\left(\eta\right)=\exp\left(\eta\right) )]] [[BR]]  [[BR]]
     152 * the probability mass function [[BR]] [[BR]]
     153   [[LatexEquation( f\left(y;\mu,\pi\right)=\begin{cases}\pi+\left(1-\pi\right)e^{-\mu} & \forall y=0\\\left(1-\pi\right)\frac{1}{y!}e^{-\mu}\mu^{y} & \forall y>0\end{cases} )]] [[BR]] [[BR]]
     154 * and its logarithm will be [[BR]] [[BR]]
     155   [[LatexEquation( \ln f\left(y;\mu,\pi\right)=\begin{cases}\ln\left(\pi+\left(1-\pi\right)e^{-\mu}\right) & \forall y=0\\\ln\left(1-\pi\right)-\ln\left(\Gamma\left(y+1\right)\right)+y\ln\mu-\mu & \forall y>0\end{cases} )]] [[BR]] [[BR]]
     156 * the partial derivatives of log-density function respect to the linear prediction are equals than in a pure Poisson [[BR]] [[BR]]
     157   [[LatexEquation( \frac{\partial\ln f}{\partial\eta}=y-e^{\eta} )]] [[BR]] [[BR]]
     158   [[LatexEquation( \frac{\partial^{2}\ln f}{\partial\eta^{2}}=-e^{\eta} )]] [[BR]] [[BR]]
     159