How to use Custom-defined link function with poisson regression
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want to use Poisson regression on a model that looks like following:
y = a * b^X1 * X2^c
Where a, b and c are constants.
I assume that I need to use 'glmfit' and make use of a link function, but I dont know how to write the code to get it right.
0 commentaires
Réponses (1)
Philip Caplan
le 13 Avr 2015
From my understanding of the question, it seems you would like to model the average, mu, of a response, y, to input variables, X, with a Poisson distribution. For a Poisson regression, the model is transformed with the log link:
log(mu) = beta1 +Z1*beta2 +Z2*beta3
where
beta1 = log(a)
beta2 = log(b)
beta3 = c
Z1 = X1
Z2 = log(X2)
with a, b, c, X1, X2 corresponding to your variables. You can then use "glmfit" (or "fitglm") with 'Distribution' as 'Poisson' and 'Link' as 'Log' with the above transformation to get the desired result. For more information, please see:
0 commentaires
Voir également
Catégories
En savoir plus sur Gaussian Process Regression dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!