0
我使用vis.gam()繪製從以下模型的結果:如何使用mgcv軟件包中的vis.gam()函數爲r設置x和y軸的極限值?
gam.5 <- gam(mortality.under.2~s(maternal_age)+ s(birth_year) +
te(birth_year,maternal_age) + wealth + sex +
residence+ maternal_educ
,data=colombia1,family="binomial")
使情節的代碼如下:
vis.gam(gam.5,view=c("maternal_age","birth_year"),
plot.type="contour",type="response",
cond=list(wealth="Lowest quintile",sex="Female",
residence="Rural",maternal_educ="Primary"))
不幸的是,它產生的外部預測值變量'maternal_age'和'birth_year'的數據範圍。有關如何限制view
中變量的預測值範圍的任何建議?
謝謝一堆,
安東尼奧佩德羅。
看看'too.far'參數到'vis.gam' – mnel 2013-02-11 04:44:21