[R] R2BayesX
Shanley Chong
Shanley.Chong at sswahs.nsw.gov.au
Wed Feb 4 22:56:57 CET 2015
Dear Z and Nikolaus,
Thank you for your help.
Here is my R codes:
>data("MunichBnd")
>N <- length(MunichBnd); n <- N*5
>dat <- data.frame(x1 = runif(n, -3, 3),id = as.factor(rep(names(MunichBnd), length.out = n)))
>dat$sp <- with(dat, sort(runif(N, -2, 2), decreasing = TRUE)[id])
>dat$re_poi <- with(dat, rpois(N, 10)[id])
>dat$y_poi <- with(dat, 1.5 + sin(x1) + sp + re_poi + rpois(n, 10))
>b_poi <- bayesx(y_poi ~ sx(x1) + sx(id, bs = "mrf", map = MunichBnd) + sx(id, bs = "re"), method = "MCMC", data = dat, family='poisson')
Warning message:
running command '"C:/Users/ChongS/Documents/R/win-library/3.1/BayesXsrc/libs/x64/BayesX.exe" C:/Users/ChongS/AppData/Local/Temp/RtmpqMhw3Z/bayesx/bayesx.estim.input.prg' had status 3
If I run the model using family='gaussian', it doesn't have problem.
b_poi <- bayesx(y_poi ~ sx(x1) + sx(id, bs = "mrf", map = MunichBnd) + sx(id, bs = "re"), method = "MCMC", data = dat, family='gaussian')
Kind regards,
Shanley
-----Original Message-----
From: Achim Zeileis [mailto:Achim.Zeileis at uibk.ac.at]
Sent: Wednesday, 4 February 2015 8:20 PM
To: Shanley Chong
Cc: r-help at r-project.org; Nikolaus.Umlauf at uibk.ac.at
Subject: Re: [R] R2BayesX
Shanley:
> I am trying to run STAR logistic/binomial model using R2BayesX . A
> warning message came up every time when i included a random effect,
> bs='re', (unstructured spatial effect) into the model. The warning
> message is : Warning message: running command
> '"C:/Users/ChongS/Documents/R/win-library/3.1/BayesXsrc/libs/x64/BayesX.exe"
> C:/Users/ChongS/AppData/Local/Temp/RtmpCW8QY9/bayesx33/bayesx.estim.input.prg'
> had status 5
I haven't seen this problem before. Maybe you can provide "commented, minimal, self-contained, reproducible code" (as the posting guide asks)?
I'm also cc'ing the package maintainer (Nikolaus Umlauf) as he might be able to give more insight.
Best,
Z
> The model is fine when i just ran the model using mrf, bs='mrf', (structured spatial effect).
>
> And when i tried to run STAR using family=Gaussian (response is normally distributed) with structured and unstructured spatial effect, it is fine too.
>
> Can anyone please help?
>
> Regards,
>
> Shanley
>
>
> _____________________________________________________________________
> This email has been scanned for the Sydney & South Western Sydney Local Health Districts by the MessageLabs Email Security System.
> Sydney & South Western Sydney Local Health Districts regularly monitor email and attachments to ensure compliance with the NSW Ministry of Health's Electronic Messaging Policy.
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
_____________________________________________________________________
This email has been scanned for the Sydney & South Western Sydney Local Health Districts by the MessageLabs Email Security System.
Sydney & South Western Sydney Local Health Districts regularly monitor email and attachments to ensure compliance with the NSW Ministry of Health's Electronic Messaging Policy.
_____________________________________________________________________
This email has been scanned for the Sydney & South Western Sydney Local Health Districts by the MessageLabs Email Security System.
Sydney & South Western Sydney Local Health Districts regularly monitor email and attachments to ensure compliance with the NSW Ministry of Health's Electronic Messaging Policy.
More information about the R-help
mailing list