R中使用glm()函數擬廣義線性模型,其格式爲git
glm(formula,family= family(link=funciton),data = )
機率分佈(famiily)和相應默認的鏈接函數(function)ide
glm()參數表函數
分佈族 | 默認的鏈接函數 |
binomial(二項式) | (link = "logit") |
gaussian (高斯) | (link ="identity") |
gamma(伽馬) | (link = "inverse") |
inverse.gaussian | (link ="1/mu^2") |
poisson (泊松) | (link ="log") |
quasi | (link ="identity",variance = "constant") |