Come interpretare le stime dei parametri nei risultati GLM di Poisson [chiuso]


14
Call:
glm(formula = darters ~ river + pH + temp, family = poisson, data = darterData)

Deviance Residuals:
    Min      1Q   Median     3Q    Max
-3.7422 -1.0257   0.0027 0.7169 3.5347

Coefficients:
              Estimate Std.Error z value Pr(>|z|)
(Intercept)   3.144257  0.218646  14.381  < 2e-16 ***
riverWatauga -0.049016  0.051548  -0.951  0.34166
pH            0.086460  0.029821   2.899  0.00374 **
temp         -0.059667  0.009149  -6.522  6.95e-11 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

(Dispersion parameter for poisson family taken to be 1)
Null deviance: 233.68 on 99 degrees of freedom
Residual deviance: 187.74 on 96 degrees of freedom
AIC: 648.21

Voglio sapere come interpretare ogni parametro stimato nella tabella sopra.



6
Questa domanda sembra fuori tema perché si tratta di spiegare un output R senza alcuna forma di domanda intelligente dietro. Questa è la categoria "Ho scaricato l'output del mio computer lì ed esegui l'analisi stat per me" ...
Xi'an,

1
Il parametro di dispersione sembra indicare che ci sono alcuni problemi con il modello. Forse dovresti prendere in considerazione l'utilizzo di una distribuzione quasipoisson. Scommetto che le stime dei tuoi parametri cambieranno drasticamente e così anche l'interpretazione. Se esegui "grafico (modello)" otterrai alcuni grafici dei tuoi residui, dai un'occhiata a questi grafici per i modelli indesiderati prima di iniziare a interpretare il tuo modello reale. Per tracciare rapidamente la misura del tuo modello puoi anche usare "visreg (modelfit)" dal pacchetto visreg
Robbie,

3
@ Xi'an, anche se la domanda è scarsa e la modifica richiesta, non penso che sia fuori tema. Considera queste domande che non sono considerate fuori tema: Interpretazione dell'output di R's lm () e Interpretazione dell'output di R per la regressione binomiale . Sembra essere un duplicato , tuttavia.
gung - Ripristina Monica

2
Questo è un duplicato di Come interpretare i coefficienti in una regressione di Poisson? Si prega di leggere il thread collegato. Se hai ancora una domanda dopo averlo letto, torna qui e modifica la tua domanda per dichiarare ciò che hai imparato e ciò che devi ancora sapere, quindi possiamo fornire le informazioni di cui hai bisogno senza semplicemente duplicare materiale altrove che già non ha aiutato voi.
gung - Ripristina Monica

Risposte:


28

Non credo che il titolo della tua domanda catturi accuratamente ciò che stai chiedendo.

La domanda su come interpretare i parametri in un GLM è molto ampia perché il GLM è una classe molto ampia di modelli. Ricordiamo che un GLM modella una variabile di risposta che si presume segua una distribuzione nota della famiglia esponenziale e che abbiamo scelto una funzione invertibile gyg tale che per levariabili predittive J x . In questo modello, l'interpretazione di ogni particolare parametro β j è la velocità di variazione di g ( y ) rispetto a x j . Definire μ E [ y

E[y|x]=g1(x0+x1β1++xJβJ)
Jxβjg(y)xj eηxβper mantenere pulita la notazione. Quindi, per qualsiasij{1,...,J}, β j =μE[y|x]=g1(x)ηxβj{1,,J} Ora definireejessere un vettore diJ-1zeri e un singolo1nellajesima posizione, in modo che per esempio seJ=5alloraE3=(0,0,1,0,0). Quindi βj=g(E [ y
βj=ηxj=g(μ)xj.
ejJ11jJ=5e3=(0,0,1,0,0)
βj=g(E[y|x+ej])g(E[y|x])

Il che significa solo che è l'effetto su η di un aumento di unità in x j .βjηxj

Puoi anche dichiarare la relazione in questo modo: ed E[y

E[y|x]xj=μxj=dμdηηxj=μηβj=dg1dηβj
E[y|x+ej]E[y|x]Δjy^=g1((x+ej)β)g1(xβ)

Senza sapere nulla di , questo è quanto possiamo. β j è l'effetto su η , sulla media condizionale trasformata di y , di un aumento di unità in x j , e l'effetto sulla media condizionale di y di un aumento di unità in x j è g - 1 ( β ) .gβjηyxjyxjg1(β)


Ma sembra che tu stia chiedendo specificamente della regressione di Poisson usando la funzione di collegamento predefinita di R, che in questo caso è il logaritmo naturale. Se questo è il caso, si sta chiedendo uno specifico tipo di GLM , in cui e g = ln . Quindi possiamo ottenere una certa trazione rispetto a un'interpretazione specifica.yPoisson(λ)g=ln

Da quanto ho detto sopra, sappiamo che . E poiché conosciamog(μ)=ln(μ), sappiamo anche cheg-1(η)=eη. Ci capita anche di sapere chedeημxj=dg1dηβjg(μ)=ln(μ)g1(η)=eη, quindi possiamo dire che μdeηdη=eη

μxj=E[y|x]xj=ex0+x1β1++xJβJβj

che finalmente significa qualcosa di tangibile:

Dato un piccolo cambiamento di , l'aderente y varia da yxjy^ .y^βj

Nota: questa approssimazione può effettivamente funzionare per modifiche fino a 0,2, a seconda della precisione necessaria.

E utilizzando l'interpretazione più familiare variazione unitaria, abbiamo:

Δjy^=ex0+x1β1++(xj+1)βj++xJβJex0+x1β1++xJβJ=ex0+x1β1++xJβJ+βjex0+x1β1++xJβJ=ex0+x1β1++xJβJejβex0+x1β1++xJβJ=ex0+x1β1++xJβJ(ejβ1)
which means

Given a unit change in xj, the fitted y^ changes by y^(ejβ1).

There are three important pieces to note here:

  1. The effect of a change in the predictors depends on the level of the response.
  2. An additive change in the predictors has a multiplicative effect on the response.
  3. You can't interpret the coefficients just by reading them (unless you can compute arbitrary exponentials in your head).

So in your example, the effect of increasing pH by 1 is to increase lny^ by y^(e0.091); that is, to multiply y^ by e0.091.09. It looks like your outcome is the number of darters you observe in some fixed unit of time (say, a week). So if you're observing 100 darters a week at a pH of 6.7, raising the pH of the river to 7.7 means you can now expect to see 109 darters a week.


I made a couple tweaks here, @ssdecontrol. I think they'll make your post a little easier to follow, but if you don't like them, roll them back with my apologies.
gung - Reinstate Monica

I you can't figure that out from my answer then clearly I need to revise the answer. What are you still confused about?
shadowtalker

Plug those numbers into the equation just like in linear regression
shadowtalker

1
@skan no, I mean E[y|x]. x and y are random variables representing to a single observation. x is a vector indexed by j; xj is the random variable representing a specific feature/regressor/input/predictor for that observation.
shadowtalker

2
And don't overthink it. Once you understand all the pieces in a GLM, the manipulations here are just a direct application of calculus principles. It really is as simple as taking the derivative with respect to the variable you're interested in.
shadowtalker

3

My suggestion would be to create a small grid consisting of combinations of the two rivers and two or three values of each of the covariates, then use the predict function with your grid as newdata. Then graph the results. It is much clearer to look at the values that the model actually predicts. You may or may not want to back-transform the predictions to the original scale of measurement (type = "response").


1
As much as I like this approach (I do it all the time) I think it's counterproductive for building understanding.
shadowtalker
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.