问题1:根据应变量的特点,选择possion分布作为回归模型的分布族,对应取对数作为连接函数。那么在分析时先计算应变量 y 的对数( logy=log(y); ),让后将该对数 logy 纳入模型作为模型的应变量,这样做对吗?
问题2:模型中的自变量 x1-x4均为连续性变量,x5为自变量,这样直接纳入模型分析可以吗?
如能得到解答不胜感激,谢谢。作者: shiyiming 时间: 2010-11-1 22:30 标题: Re: 关于 proc gam 的两个问题,希望得到解答 用log transform 是不必要也是有问题的。logy 根本不是poisson 分布。y是count data。 sas 的缺失link =log 如果分布是poisson;(2)不清楚。不过大家都是这么做的。作者: shiyiming 时间: 2010-11-1 22:41 标题: Re: 关于 proc gam 的两个问题,希望得到解答 to yuzhanlong
1. you should NOT do log transformation on your dependent variable. the log link function (default) will handle this for you in Generalized Linear model.
2. 自"变量 x1-x4均为连续性变量,x5为自变量" Do you mean x5 is a categorical variable or something?作者: shiyiming 时间: 2010-11-3 20:33 标题: Re: 关于 proc gam 的两个问题,希望得到解答 谢谢两位的解答,第一个问题我明白了。第二个问题中“X5是自变量”是我写错了,应该是“X5是分类变量”,不好意思。