Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
r中的单个gam图_R_Plot_Gam - Fatal编程技术网

r中的单个gam图

r中的单个gam图,r,plot,gam,R,Plot,Gam,我使用了一个广义加性模型来分析一些数据,现在我想画出结果 library(mgcv) set.seed(2) ## simulate some data... dat <- gamSim(1,n=400,dist="normal",scale=2) b <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),data=dat) plot(b,pages=1) 库(mgcv) 种子(2)##模拟一些数据。。。 dat?plot.gam告诉您有一个select参数 libr

我使用了一个广义加性模型来分析一些数据,现在我想画出结果

library(mgcv)
set.seed(2) ## simulate some data... 
dat <- gamSim(1,n=400,dist="normal",scale=2)
b <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),data=dat)
plot(b,pages=1)
库(mgcv)
种子(2)##模拟一些数据。。。

dat?plot.gam告诉您有一个select参数

library(mgcv)
set.seed(2) ## simulate some data... 
dat <- gamSim(1,n=400,dist="normal",scale=2)
b <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),data=dat)
plot(b,pages=1)
plot(b, select = 1)
plot(b, select = 2)
库(mgcv)
种子(2)##模拟一些数据。。。

dat如果我想同时绘制多个(但不是全部)平滑参数,该怎么办?