e.g...
b <- gam(Y~s(X)) ## fit
gam.check(b) ## check
fitted(b) ## fitted values
predict(b,newdata=data.frame(X=c(15,16))) ## predictions at new X
see ?predict.gam
On 14/03/14 23:24, Parviz Zare wrote:
Dear Sir,
How I can obtain the predicted values of Y variable with fitting smooth
Dear Sir,
How I can obtain the predicted values of Y variable with fitting smooth spline
regressions (in GAMs) using R software?
in my research, temperature (X variable) is as smoother and fish catch values
(Y variable) is as response
variable.
I would be grateful if you could help me.
maybe not the optimal but it works:
> Hi,
>
> I have three original curves as follows,
> n<-seq(20,200,by=10)
>
> t<-c(0.1138, 0.1639, 0.2051, 0.2473, 0.2890, 0.3304, 0.3827, 0.4075,
> 0.4618, 0.4944,
> 0.5209, 0.5562, 0.5935, 0.6197, 0.6523, 0.6771, 0.6984, 0.7209, 0.7453)
>
> es<-c(0.3682, 0.426
Hi,
I have three original curves as follows,
n<-seq(20,200,by=10)
t<-c(0.1138, 0.1639, 0.2051, 0.2473, 0.2890, 0.3304, 0.3827, 0.4075, 0.4618,
0.4944,
0.5209, 0.5562, 0.5935, 0.6197, 0.6523, 0.6771, 0.6984, 0.7209, 0.7453)
es<-c(0.3682, 0.4268, 0.5585, 0.6095, 0.7023, 0.7534, 0.8225, 0.8471, 0.
4 matches
Mail list logo