Displaying 7 results from an estimated 7 matches for "modelfile".
2013 Jan 18
0
problem that arises after using the new version of "BRugs"
...(allKnots, x, derivs = rep(drv, length(x)),
outer.ok = TRUE)$design
Z <- B %*% LZ
attr(Z, "range.x") <- range.x
attr(Z, "intKnots") <- intKnots
return(Z)
}
BRugsMCMC<-
function (data, inits, parametersToSave, nBurnin, nIter, nThin,
modelFile)
{
if ((nBurnin < 100) | (nIter < 100))
stop("currently only working for chains longer than 100")
if ((100 * round(nBurnin/100) != nBurnin) | (100 * round(nIter/100) !=
nIter))
warning("chain lengths not multiples of 100; truncation may o...
2011 Oct 27
0
glmmBUGS fails to accept higher level covariates
...ed Effects:
(Intr)
workDose -0.663
bgs.toteeg<-glmmBUGS(data=book, observations="totalEEG",
covariates=list(MRN="AgeYrs", COURSE="WEIGHTKG", observations="workDose"),
effects=c("MRN", "COURSE"), family="gaussian", modelFile="model.bug")
however, this is failing with:
Error in glmmBUGS(data = book, observations = "totalEEG", covariates =
list(MRN = "AgeYrs", :
unused argument(s) (observations = "totalEEG", covariates = list(MRN =
"AgeYrs", COURSE = "WEIGHTKG&...
2010 Oct 15
1
Problem using BRugs
...ot;wo","wd","ww","mu","tau")
inits<-function() {list(beta=beta0, rho_o=rho_o_0, rho_d=rho_d_0,
rho_w=rho_w_0)}
parameters<-c("beta", "rho_o", "rho_d", "rho_w")
probit.sim<-BRugsFit(data,inits,parameters,modelFile="spatial.openbugs.txt",numChains=1,nIter=2000)
# my model
model {
for (i in 1:676) {
y[i] ~ dbern(p[i])
wwy[i]<- inprod(ww[i, 1:676] , y[])
woy[i]<- inprod(wo[i, 1:676] , y[])
wdy[i]<- inprod(wd[i, 1:676] , y[])
probit(p[i])<- rho_o * woy[i] + rho_d * wdy[i] + rho_w...
2010 Apr 13
2
.Fortran interface error
Hi all,
I'm preparing a package which uses .Fortran to interface a Fortran 95
function. This F95 function simply receives the name of a file from R,
opens this file and forwards its content to a F95 module, which, in turn,
makes the real computation. The F95 module is a pre-existing one and I'm
trying to use it in its actual state.
Thus, data transfer between R and this F95 module is
2012 Jun 06
1
error calling Winbugs using R2WinBugs to run a multi-level model
...its=5, data.file="dir1\\data1.txt")
# test the model runs
fit = bugs(data=paste("C:\\Users\\User1\\Documents\\dir1\\data1.txt",dataFile,sep=""),
inits=NULL, parameters.to.save=list('par1','par2','par3'),
model.file=modelFile,
debug=TRUE, n.chains=3, n.iter=20, n.burnin=3, n.thin=1, digits=4)
## The trap
incompatible copy
BugsScript.Action.Do [00000436H]
.a BugsScript.Action [025B6790H]
.argNum INTEGER 0
.bugsCommands ARRAY 240 OF CHAR 7877X, 75A5X, 0B17X, 3701X ...
.p ARRAY 3, 120 OF CHAR Ele...
2011 Jun 27
0
OpenBUGS and glmmBUGS package
...casedata)
spplot(ontario, 'SMR')
library(spdep)
popDataAdjMat = poly2nb(ontario, ontario[["CSDUID"]])
library(glmmBUGS)
forBugs = glmmBUGS(formula=observed + logExpected ~ 1,
effects="CSDUID", family="poisson", spatial=popDataAdjMat,
data=ontario at data, modelFile="model.txt")
startingValues = forBugs$startingValues
source("getInits.R")
library(R2OpenBUGS)
ontarioResult = bugs(forBugs$ragged, getInits, parameters.to.save =
names(getInits()), model.file="model.txt", n.chain=3, n.iter=100,
n.burnin=10, n.thin=2)
--------------...
2010 Apr 19
1
BRugs
...p(0, Lgen-1)),
a3<-c(NA, rep(0, Lrace-1)),
a12<-matrix( c(rep(NA, 13), NA,rep(0, 12)), ncol=2),
gam<-rep(1,Lstra), u<-matrix(rep(0, 30), nrow=2) )
}
bi.bmi.model.parameters=c( 'a0', 'a1', 'a2', 'a3', 'a12')
bi.bmi.model.bugs=BRugsFit(modelFile='bi.bmi.model2.txt',
data=bi.bmi.model.data,
inits=bi.bmi.model.init,
numChains=1,
para=bi.bmi.model.parameters,
nBurnin=20, nIter=40)
When I run this I get this message.
model is syntactically correct
data loaded
array index is greater than array upper...