[R] Predict in the package R2BayesX
niandra
gianluca.mastrantonio at yahoo.it
Thu Jun 7 01:54:54 CEST 2012
Hi all
I'm using the function bayesx to estimate a simple model, for example:
library(R2BayesX)
## generate some data
set.seed(111)
n <- 200
## regressor
dat <- data.frame(x = runif(n, -3, 3))
## response
dat$y <- with(dat, 1.5 + sin(x) + rnorm(n, sd = 0.6))
## estimate models with
## bayesx REML and MCMC
b1 <- bayesx(y ~ sx(x), method = "REML", data = dat)
I want to know (predict) the value y for new x values, for example:
xnew <- runif(10,0,1).
but i can't find a "predict" function.
How can i do?
--
View this message in context: http://r.789695.n4.nabble.com/Predict-in-the-package-R2BayesX-tp4632618.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list