CenterForStatistics-UGent / pim

R package for probabilistic index models
9 stars 5 forks source link

Model matrix constructed different with link = identity and link = logit #2

Open JoFAM opened 6 years ago

JoFAM commented 6 years ago

Ik moest een PIM fitten met het PIM package en denk een inconsistentie gevonden te hebben. Het was een model met een 0/1 dummy. Als ik een logit link functie gebruik is de regressor Z=X^-X (notatie uit PIM paper), maar met een identity link is het Z=X-X^.

Problem is the fact that using a simple formula with the identity link doesn't add an intercept to the model matrix. This needs to be solved.

Code :

m<-pim(FEV~Smoke,link="identity",data=FEVSubset) summary(m) pim.summary of following model : FEV ~ Smoke Type: difference Link: identity

Estimate Std. Error z value Pr(>|z|) Smoke -0.24064 0.09116 -2.64 0.0083 **

Signif. codes: 0 '' 0.001 '' 0.01 '' 0.05 '.' 0.1 ' ' 1

Null hypothesis: b = 0

m<-pim(FEV~Smoke,link="logit",data=FEVSubset) summary(m) pim.summary of following model : FEV ~ Smoke Type: difference Link: logit

Estimate Std. Error z value Pr(>|z|) Smoke 1.1492 0.4989 2.303 0.0213 *

JoFAM commented 6 years ago

Both model matrices are identical, so it has nothing to do with a missing intercept or so.