开发者

R verification package

I solved the problem of reading the data and got some plots from verification package of R. Now i want to know that how to arrange data in R i.e. i arranged the observation data like (120, 396) where 120 is the lead time and 396 is the total initial time. The forecast data has one extra dimension of ensemble member like (120, 396,10). Before putting these data sets into verify function of verification package, i do like this

obs=round(runif(100))
forecast=r开发者_如何学编程unif(100)

I do not know why this process is necessary and what it does but it is necessary before putting into verify function. Then to use verify function i use,

verify(obs,forecast,obs.type="binary",frcst.type="prob")

Then everything is OK and i can use the result of verify function to other things. But i do not know how verification package works and my data arrangement is correct? Which dimension is taken as sample dimension in above data set 120, 396?


You have to tell verify which data you want it to look at and what type of data it is. So the example lines you show have two vectors, where obs is 0 or 1 and is a binary variable, while forecast is continuous between 0 and 1 and is a probability.

Your data looks as if it may be continuous both in the observation and the forecast and you may want to apply verify to the second element of each pair or triple. If so, looking at this example may help you understand how verify can work in such cases.

x <- 120:130
ob <- data.frame(cbind(x, y=3 * x + 40 * rnorm(11) ) )
ob
fc <- data.frame(cbind(x, y=3 * x + 10 * rnorm(11), z = rep(10,11) ) )
fc
V  <- verify(ob$y, fc$y, obs.type = "cont", frcst.type = "cont" )
summary(V)

Clearly you will need to use your own variable names when you come to verify your own observations and forecasts.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜