search for: modeldata

Displaying 13 results from an estimated 13 matches for "modeldata".

2006 Feb 02
1
error message in cox regression cph()
...know I could have used coxph() instead, but I'd like to predict the outcome on another dataset and coxph() does not allow for interaction terms... I hope anyone can help me here. Underneath is the code I used for my data, if it's of any use... Thanks, cheers Roel Roel May NINA, Norway modeldata <- as.data.frame(modeldata) survchoice<-Surv(2-modeldata$USED,is.element(modeldata$USED,1)) d <- datadist(modeldata$ID,modeldata$ASP_NW,modeldata$ALT,modeldata$SLOPE,modeldata$PLACEMENT,modeldata$DTL,modeldata$TRACK,modeldata$PRIVATE,modeldata$BUSH,modeldata$ROCK,modeldata$GRASS,modeldat...
2008 Apr 08
2
Error: expected the collection operator c error pos 98 (error on line 1)
...model with a cohort size N=1. I output the simulation data using bugsdata(data), where data is the following list. > data $Dose [1] 140 $Y [1] 0 bugsdata(data) puts out the file data.txt as follows. list(Dose=1.40000E+02, Y=0.00000E+00) after I type the following line modelData("data.txt") # read data file I get the ERROR: expected the collection operator c error pos 98 (error on line 1) If I rewrite the file list(Dose=c(1.40000E+02), c(Y=0.00000E+00)) it runs fine. Can you suggest a way to get the output dataset to automatically p...
2008 Dec 09
1
expected variable name error pos 98349 WInBUGS in R
...ata.txt") > > inits.bugs <- list("alpha"=rep(0,n.sites), "tau"=1) > > bugsInits(list(inits.bugs), fileName = "nauseainit.txt") > > modelCheck("nausea_random.txt") # check model file > model is syntactically correct > > modelData("nauseadata.txt") # read data file > expected variable name error pos 98349 > *MODEL* > model > { > for (i in 1:n.samples) > {NAUSEA[i] ~ dbin(p[i],1) > logit(p[i]) <- alpha[SITEID[i]]} > #for(k in 1:n.params) > #{b[k]~ dnorm(0.0,tau)} &gt...
2009 Jul 20
2
HELP: BRUGS/WinBUGS/RBUGS Response is a combination of random variables
...UGS language allows the combination of variables as response such as Y[i] <- a*X1[i]+b*X2[i] Y[i] ~ dnorm(c,d) It seems doesn't work in my model. The problem is between two ######. The error message is > modelCheck("BayesBioMarker.BUGS") model is syntactically correct > modelData(paste("BUGS_data.txt",sep="")) data loaded > modelCompile(numChains=1) multiple definitions of node bm[1] =================================== model { for(iter in 1:numSubj){ bmd[iter] ~ dnorm(u[trt[iter]+1],sdbmd.precision);...
2008 Dec 07
1
Reading txt file in R
...useadata.txt") inits.bugs <- list("b"=rep(0,n.params),"alpha"=rep(0,n.sites), "tau"=1) bugsInits(list(inits.bugs), fileName = "nauseainit.txt") > modelCheck("nausea_random.txt")       # check model file model is syntactically correct > modelData("nauseadata.txt")                     # read data file expected variable name error pos 134022 Model statement: model { for (i in 1:n.samples) {NAUSEA[i] ~ dbin(p[i],1) logit(p[i]) <- alpha[SITEID[i]] + b[1] + b[2]*BMI[i]} for(k in 1:n.params) {b[k]~ dnorm(0.0,tau)} for (j in 1:n.sit...
2008 Dec 08
1
Reading txt file in R to run Random Intercept Model
...fileName = "nauseadata.txt") > inits.bugs <- list("alpha"=rep(0,n.sites), "tau"=1) > bugsInits(list(inits.bugs), fileName = "nauseainit.txt") > modelCheck("nausea_random.txt") # check model file model is syntactically correct > modelData("nauseadata.txt") # read data file expected variable name error pos 98349 *MODEL* model { for (i in 1:n.samples) {NAUSEA[i] ~ dbin(p[i],1) logit(p[i]) <- alpha[SITEID[i]]} #for(k in 1:n.params) #{b[k]~ dnorm(0.0,tau)} for (j in 1:n.sites) {alpha[j]~dnorm(0.0,1.0E-10...
2012 Sep 25
0
how to specify the multinomial distribution in R
...~ dmulti(p2[i,1:2],n2[i]) #t2[] is a matrix with two columns, the problem is how to specify it in R p2[i,1] <- (p[i] * s1[t[i]] * s2[t[i]] + (1 - p[i]) * (1 - c1[t[i]]) * (1 - c2[t[i]]))/p1[i] p2[i,2] <- (p[i] * s1[t[i]] * (1 - s2[t[i]]) +(1 - p[i]) * (1 - c1[t[i]]) * c2[t[i]])/p1[i] t2<-modeldata[,c(6,7)] #This is the method that i used. Unfortunately, it seems not to work. data<-list("m",...,"t2") #data[[10]] is just "t2" The error information is :Error in is.finite(x) : default method not implemented for type 'list' when using traceback(), i...
2018 Apr 26
1
help with tdm matrix and knn
hello sir im working on text classification using java and r programming i start with exporting a document term matrix (tdm) from my java programme using corpus and now i try to apply knn algorithem using the matrix and r but i cant do that any help sir here my data here my script https://mega.nz/#!Q6J2ibAA!4PadiOKbP7rLodyiRrVsdKl-D2ZP7LYm0gaz94uBmF8 itry to post put icant whay!!
2012 Jan 11
0
Error in charToDate(x)
...(EURUSD) +myEMA20(EURUSD) +myEMA30(EURUSD) +myEMA50(EURUSD) + myEMA60(EURUSD) + CMO(Cl(EURUSD)) + EMA(Delt(Cl(EURUSD))) + myVolat(EURUSD) + myMACD(EURUSD) + RSI(Cl(EURUSD)) + mySAR(EURUSD) + runMean(Cl(EURUSD)) + runSD(Cl(EURUSD))) I then tried to do the following: Tdata.train <- as.data.frame(modelData(data.model, data.window=c('2011-08-03','2011-12-30'))) This gave me the following error: Warnmeldungen: 1: In which(index(model.data) >= as.Date(data.window[1], origin = "1970-01-01")) : Inkompatible Methoden ("Ops.POSIXt", "Ops.Date") f?r "&...
2011 Oct 24
0
Output from BRugs Doesn't Match That from OpenBUGS
...> model.file.name = 'C:/Users/ethan/Desktop/Dissertation/R/Dyes/Model.txt' > model.data.name = 'C:/Users/ethan/Desktop/Dissertation/R/Dyes/data.txt' > n.chains = 1 > write.model(model, model.file.name) > modelCheck(model.file.name) model is syntactically correct > modelData(model.data.name) data loaded > modelCompile(numChains=n.chains) model compiled > model.init.name = bugsInits(inits) > modelInits(rep(model.init.name,n.chains)) Initializing chain 1: initial values loaded but chain contain uninitialized variables > modelGenInits() initial values generate...
2012 Jan 24
1
Error from Brugs "'r for windows gui front-end has stopped working''
Dear all, I just try to run the example in R brugs packages, but not only once. Loop is added in this example. After several times (7, 11, or other random number), there is an error message "r for windows gui front-end has stopped working". This happened in two laptops with windows 7 and vista. I have tried different versions of R (2.14.1 and 2.13) and Brugs packages (0.7.1 and 0.7-5).
2009 Oct 06
2
R, Coda, and OpenBUGS
Hi All, I am trying to figure out how to use R-Coda with the output from OpenBugs. I have installed and loaded the packages BRugs and R2WinBUGS. I have successfully run a simple Bayes model in WinBUGS using R2WinBUGS' "bugs" and have used "read.bugs" to build the coda object. I can successfully switch to OpenBugs and run the same model and get the basic summary
2013 Jan 18
0
problem that arises after using the new version of "BRugs"
...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 occur.") modelCheck(modelFile) modelData(bugsData(data)) modelCompile(numChains = 1) modelInits(bugsInits(inits)) burninIncSize <- round(nBurnin/(nThin * 100)) for (i in 1:100) { modelUpdate(burninIncSize, thin = nThin) } samplesSet(parametersToSave) iterIncSize <- round(nI...