Ozone35数据集上的Gibbs抽样方案

时间:2014-11-10 00:53:32

标签: r regression bayesian

我正试图在R的BayesVarSel包中对数据集Ozone35运行Gibbs抽样方案。

以下是有关数据集Ozone35的信息:

A data frame with 178 observations on the following 36 variables.

y Response = Daily maximum 1-hour-average ozone reading (ppm) at Upland, CA

x4 500-millibar pressure height (m) measured at Vandenberg AFB

x5 Wind speed (mph) at Los Angeles International Airport (LAX)

x6 Humidity (percentage) at LAX

x7 Temperature (Fahrenheit degrees) measured at Sandburg, CA

x8 Inversion base height (feet) at LAX

x9 Pressure gradient (mm Hg) from LAX to Daggett, CA

x10 Visibility (miles) measured at LAX

x4.x4 =x4*x4

x4.x5 =x4*x5

x4.x6 =x4*x6

x4.x7 =x4*x7

x4.x8 =x4*x8

x4.x9 =x4*x9

x4.x10 =x4*x1010 Ozone35

x5.x5 =x5*x5

x5.x6 =x5*x6

x5.x7 =x5*x7

x5.x8 =x5*x8

x5.x9 =x5*x9

x5.x10 =x5*x10

x6.x6 =x6*x6

x6.x7 =x6*x7

x6.x8 =x6*x8

x6.x9 =x6*x9

x6.x10 =x6*x10

x7.x7 =x7*x7

x7.x8 =x7*x8

x7.x9 =x7*x9

x7.x10 =x7*x10

x8.x8 =x8*x8

x8.x9 =x8*x9

x8.x10 =x8*x10

x9.x9 =x9*x9

x9.x10 =x9*x10

x10.x10 =x10*x10

我运行以下Gibbs采样方案来确定最佳模型:

Oz35.GibbsBvs<- GibbsBvs(formula="y~.", data=Ozone35, prior.betas="gZellner",
                     prior.models="Constant", n.iter=10000,     
init.model="null",n.burnin=100, time.test = FALSE)

但是,当我运行以下代码时,我收到错误消息“plot.new()中的错误:数字边距太大”:

plotBvs(Oz35.GibbsBvs, option="conditional")

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:2)

你在Rstudio中运行这个吗?有时您需要使绘图窗口更大以适应图形。