similar to: A question about R2Winbugs

Displaying 20 results from an estimated 600 matches similar to: "A question about R2Winbugs"

2009 Aug 20
1
Understanding R code
What is 1. par.ests <- optimfit$par 2. fisher <- hessb(negloglik, par.ests, maxvalue=maxima); 3. varcov <- solve(fisher); 4. par.ses <- sqrt(diag(varcov)); Thanks a lot, fit.GEV <- function(maxima) { sigma0 <- sqrt((6. * var(maxima))/pi) mu0 <- mean(maxima) - 0.57722 * sigma0 xi0 <- 0.1 theta <- c(xi0, mu0, sigma0) #10/5/2007: removed assign() for maxima.nl
2008 Nov 11
1
simulate data with binary outcome and correlated predictors
Hi, I would like to simulate data with a binary outcome and a set of predictors that are correlated. I want to be able to fix the number of event (Y=1) vs. non-event (Y=0). Thus, I fix this and then simulate the predictors. I have 2 questions: 1. When the predictors are continuous, I can use mvrnorm(). However, if I have continuous, ordinal and binary predictors, I'm not sure how to simulate
2006 Apr 05
2
R2WinBUGS error
Dear R-help, I'm using the R2WinBUGS package and getting an error message: Error in file(file, "r") : unable to open connection In addition: Warning message: cannot open file 'codaIndex.txt', reason 'No such file or directory' I'm using R 2.2.1 and WinBUGS 1.4.1 on a windows machine (XP). My R code and WinBUGS code is given below.
2009 Aug 21
3
extra .
sigma0 <- sqrt((6. * var(maxima))/pi) What does the '.' do here? -- View this message in context: http://www.nabble.com/extra-.-tp25073255p25073255.html Sent from the R help mailing list archive at Nabble.com.
2008 Jan 04
2
R2WinBUGS sending variables as factors
Hello R and BUGS users, I am writing a heirarchical model in R to send to BUGS via R2WinBUGS and I am finding it difficult to get the model to run. I seem to be having two problems. 1) I can't seem to send variables classed as factors (Month), is there a way do this? 2) Checking the Log in WinBUGS I can see that the model is Syntactically correct, but Bugs is not able to recognise the the
2009 May 03
3
Optim function in the loop
Hi all, I wrote the following lines of codes try to do some iterations to find the global optimal values, but the function does not execute properly. Every time codes stop after one iteration right after executing the optim() function. Does anyone could have me to take a look? Thanks. if (count>0){ k=k+0.05; mu0=c(83+k,0,0) Sigma0= diag(0.4,3) initpar=c(.1+10*k,10*k,10*k,10*k) # initial
2006 Jun 01
1
setting the random-effects covariance matrix in lme
Dear R-users, I have longitudinal data and would like to fit a model where both the variance-covariance matrix of the random effects and the residual variance are conditional on a (binary) grouping variable. I guess the model would have the following form (in hierarchical notation) Yi|bi,k ~ N(XiB+Zibi, sigmak*Ident) bi|k ~ N(0, Dk) K~Bernoulli(p) I can obtain different sigmas (sigma0 and
2001 Nov 09
2
ks.test
Dear R-List members, I want to check if a set of measurements follows better a gamma or a lognormal distribution (see data below). Using shapiro.test I can test for normality (shapiro.test(log (Lt)). To test for gamma (and normal) distribution I would use ks.test but I need to specify its shape and scale. How should I calculate these values in R? I tried > Lt.fit <- glm(Lt ~ 1,
2006 Apr 06
0
R2WinBUGS erro
Dear R-help, I'm using the R2WinBUGS package and getting an error message: Error in file(file, "r") : unable to open connection In addition: Warning message: cannot open file 'codaIndex.txt', reason 'No such file or directory' I'm using R 2.2.1 and WinBUGS 1.4.1 on a windows machine (XP). My R code and WinBUGS code is
2008 Sep 09
2
test for a single variance
Dear R Gurus: Is there a test for a single variance available in R, please? Thanks, Edna Bell
2007 Sep 10
2
Are the error messages of ConstrOptim() consisten with each other?
Dear Friends. I found something very puzzling with constOptim(). When I change the parameters for ConstrOptim, the error messages do not seem to be consistent with each other: > constrOptim(c(0.5,0.3,0.5), f=fit.error, gr=fit.error.grr, ui=ui,ci=ci) Error in constrOptim(c(0.5, 0.3, 0.5), f = fit.error, gr = fit.error.grr, : initial value not feasible > constrOptim(c(0.5,0.9,0.5),
2007 Sep 09
2
What does it mean by "initial value not available"?
Dear friends. I use ConstrOptim( ) and got error message "initial value not available". My understanding of "initial value not available" is that one of the following 3 cases happens: 1.The objective function is not well defined at the point of the initial value. 2. The differentiation of the objective function is not well defined at the point of the initial value. 3. The
2008 May 24
0
simulated annealing
1. Most of the neighbors of a low cost state, x, may have much higher costs; and 2. The problem is highly degenerate in the sense that there are states, x, with a large (sub) neighborhood of equal cost states, S(x) = fy inside N(x) and f(y) = f(x). In this case, even rejecting all the proposals that would take us out of S, would still give us a significant acceptance rate. The best way we found
2017 Jun 04
0
Hlep in analysis in RWinBugs
Hi R User, I was trying to use R for WINBUGS using following model and data (example), but I am new with WINBUGS and don't know how we perform the analysis. I wonder whether I can run the following the example data and Winbugs Model in R. Your help will be highly appreciated. Sincerely, SN PANDIT === library(R2WinBUGS) #Model model{ #likelihood for(i in 1:N){ a1[i] ~ dnorm(a11[i],tau)
2017 Jun 04
0
Help in analysis in RWinBugs
Hi R User, I was trying to use R for WINBUGS using following model and data (example), but I am new with WINBUGS and don't know how we perform the analysis. I wonder whether I can run the following the example data and Winbugs Model in R. Your help will be highly appreciated. Sincerely, SN PANDIT === library(R2WinBUGS) #Model model{ #likelihood for(i in 1:N){ a1[i] ~ dnorm(a11[i],tau)
2007 Sep 25
6
R2Winbugs problem
Just while I use R2Winbugs, the following error will be presented. Please tell me how to cope with. Error in file(file, "r") : unable to open connection In addition: Warning message: cannot open file 'codaIndex.txt', reason 'No such file or directory' in: file(file, "r") -- View this message in context:
2007 Nov 24
1
R2winBUGS | option to turn off GUI?
Greetings - I run a multi-pro server box (GNU/Linux), on which I've installed winBUGS under wine. Works fine, and plays nice with r2WinBUGS, provided everything is done through a graphical front-end (either by working from console, or using a virtual desktop via VNC or equivalent). However, I'm wondering if there is a way to use R2winBUGS and winBUGS such that winBUGS does not spawn
2011 Oct 20
1
Are they fully identical: WinBUGS and OpenBUGS; R2WinBUGS and R2OpenBUGS
Hello ALL! I am running Linux, Fedora 15 64-bits, and R on it. I need to use WinBUGS and R2WinBUGS, but as far as I read, WinBUGS is closed project, to be continued with/as OpenBUGS. Thus, I have found R2OpenBUGS on OpenBUGS Contributed Code (http://openbugs.info/w/UserContributedCode), not on CRAN. Author(s) states that it is equivalent for R2WinBUGS. I tried briefly, and realized few minor
2006 Apr 22
1
Monitor() in R2WinBUGS
I have an array from an mcmc simulation and I'd like to try and use the monitor function in R2WinBUGS. The R2WinBUGS package is in the search path and when I try help(monitor) the help page appears for the function. But, when I try and use it the following happens: > monitor(sims) Error: couldn't find function "monitor" I've searched the archives but have not seen any
2009 Nov 03
2
R2WinBUGS not working?
This weekend I noticed that my R2WinBUGS connection was no longer working on my Windows computer at work AND my Ubuntu linux computer at home. As soon as WinBUGS opens, the message reads Index Out Of Range. I have un-installed and re-installed R on both computers and the problem remains the same. At first I thought it was the new version of R, but I was able to overcome the problem (on Windows