Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
384 views
in Technique[技术] by (71.8m points)

gam - How can I implement random smooth with common trajectory and different scale in R mgcv package?

I am trying to implement a special case of generalized additive mixed model using R mgcv package without success and in need of advice.

Specifically, the model has mixed effect of levels which scales common smooth link function (please see the attached figure). In other words, the model has random smooth with common trajectory (curvature) but differently scaled.

I have already tried

gam(y ~ te(level,x,bs=c('re','tp'),k=3))

where level denotes a factor variable denoting levels with mixed effects, and x denotes a continuous variable. But this results in smooth link function with different trajectory.

Thank you in advance.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...