similar to: how to specify the multinomial distribution in R

Displaying 20 results from an estimated 2000 matches similar to: "how to specify the multinomial distribution in R"

2012 Oct 26
1
Openbugs- Array Index
Hi, I'm working on the codes below however every time I run them when they get to OpenBUGS I keep getting the error message: array index is greater than array upper bound for hab. Any help would be greatly appreciated, Suzie Codes: ungulate <- read.csv(file.choose ()) #ungulate ungulate <- as.matrix(ungulate);colnames(ungulate)<-NULL;rownames(ungulate)<-NULL
2011 Oct 24
0
Output from BRugs Doesn't Match That from OpenBUGS
Hi. I am trying to analyze with BRugs the Box-Tiao variance components example in WinBUGS. The output from BRugs, mean sd MC_error val2.5pc median val97.5pc start sample sigma2.btw 681.9 1161 10.89 0.7016 253.8 4232 25001 100000 sigma2.with 4266.0 1246 4.92 2480.0000 4057.0 7262 25001 100000 doesn't match the output from WinBUGS, node mean
2008 Nov 26
0
Needs suggestions for choosing appropriate R packages
Dear all, I am thinking to fit a multilevel dataset with R. I have found several possible packages for my task, such as glmmPQL(MASS),glmm(repeated),glmer(lme4), et al. I am a little confused by these functions. Could anybody tell me which function/package is the correct one to analyse my dataset? My dataset is as follows: the response variable P is binary variable (the subject is a patient
2012 Jul 13
3
Help with R2 OpenBUGs
Hi, I'm currently working on the below codes however whenever I run it in openbugs it gives an error message saying: unknown type of logical function error pos 76. Any help would be appreciated. ## bugs code library(R2OpenBUGS) sink("C:/Users/CCF/Documents/Suzie Work/PTY Project/Waterhole Correction/ungulate.txt") cat(" model{ # hyperparameters # habitat effects for each
2011 Jun 27
0
OpenBUGS and glmmBUGS package
Dear All, I am trying to use the glmmBUGS package with OpenBUGS under Linux. Here is a short list of code I modified from the diseasemapping package document: ---------------------------------------- library(diseasemapping) data(popdata) data(casedata) model = getRates(casedata, popdata, ~age*sex, breaks=seq(0, 90, by=10) ) ontario = getSMR(popdata,model, casedata) spplot(ontario,
2008 Dec 06
1
Questions on the results from glmmPQL(MASS)
Dear Rusers, I have used R,S-PLUS and SAS to analyze the sample data "bacteria" in MASS package. Their results are listed below. I have three questions, anybody can give me possible answers? Q1:From the results, we see that R get 'NAs'for AIC,BIC and logLik, while S-PLUS8.0 gave the exact values for them. Why? I had thought that R should give the same results as SPLUS here.
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
2006 Feb 02
1
error message in cox regression cph()
Hi, I have been trying to get the cph() function of the Design package to work but get an error message I don't understand: Error in if (!length(fname) || !any(fname == zname)) { : missing value where TRUE/FALSE needed I have tried the same for a dummy dataset I made, and than it seems to work fine. However, it doesn't do it for my own data. Does anyone have a clue as to what
2006 Nov 07
1
plot questions?-errors in persp(x1, x2, y) and contour(x1, x2, y)
Dear Uwe Ligges , I still can't finish it. *> aa* #my data x1 x2 y 5 0.05 6 4.4180 1 0.50 3 2.6979 4 0.50 9 2.9000 7 0.95 6 2.6230 8 0.95 6 2.9078 9 0.95 6 2.6727 3 1.40 3 2.4203 2 1.40 9 2.5329 6 1.85 6 2.4867 *> attach(aa)* *> persp(x1,x2,y* error in persp.default(x1, x2, y) : increasing 'x' and 'y' values expected
2007 Jul 19
3
Can I test if there are statistical significance between different rows in R*C table?
Dear friends, My R*C table is as follow: better good bad Goup1 16 71 37 Group2 0 4 61 Group3 1 6 57 Can I test if there are statistical significant between Group1 and Group2, Group2 and Group3, Group1 and Group2, taking into the multiple comparisons? The table can be set up using the following program: a<-matrix(data=c(16,71,37,0,4,61,1,6,57),nrow=3,byrow=TRUE) Thanks
2011 Jan 13
1
Openbugs and rbugs on mac with wine
Hello list, I?ve been trying to get OpenBUGS running on my mac using the wine emulator. I can run Openbugs just fine by doing: wine ~/OpenBUGS312/OpenBUGS.exe In the terminal, so OpenBUGS works. When I try to run the schools example using rbugs(), the OpenBUGS process starts in wine, but it just sits there, no log, no script, no output of any sort. The rbugs () call makes the init,
2009 Jul 07
1
R2WinBUGS under Linux/WINE fails
Hi, I'm running wine-1.0.1, OpenBUGS 3.0.3, R 2.9.0, and R2WinBUGS on a Redhat Enterprise Linux machine. Following various peoples' suggestions... This works perfectly (yay!): wine Z:/opt/OpenBUGS/winbugs.exe Within R, however, I get this: (setup the example from ?bugs, then....) R> schools.sim <- bugs(data, inits, parameters, model.file, n.chains=3,
2013 Feb 10
1
BRugs Error
I installed XCode, XQuartz and OpenBUGS on my Mac using WINE. When I tried to test my installation I received the following error. If correct, BRugs does not exist for R 2.15.1. Is there a means to get arrange this problem? Thanks Paul The following code is an example from R Help bugs: > schools.sim <- bugs(data, inits, + parameters, model.file, n.chains=3, + n.iter=1000, +
2010 May 06
1
BRugs dwwinn.exe error
Hi, I have a strange behaviour of openBUGS and WinBUGS when I start them from R. Version: R: 2.10.1 openBUGS: 3.07 WinBUGS: 1.43 R2WinBUGS: 2.1-16 BRugs: 0.5-3 I have a model and data without initial start values. If I use the stand alone versions of openBUGS and WinBUGS I don't have any problems and I get what I want. If I use function bugs() from R2WinBUGS- resp. BRugs-Library then
2010 Oct 15
1
Problem using BRugs
Hi R users, I am trying to call openbugs from R. And I got the following error message: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ model is syntactically correct expected the collection operator c error pos 8 (error on line 1) variable ww is not defined in model or in data set [1] "C:\\DOCUME~1\\maomao\\LOCALS~1\\Temp\\RtmpqJk9R3/inits1.txt"
2008 Jan 31
1
R2WinBUGS is broken
Dear R-users, I am trying to use the following code to reproduce results from Prof. Gelman's book, but have the listed error for R2WinBUGS version (the openbugs version is good). I am using R-2.6.1 on windows XP, and all the R packages are most current ones. schools.bug can be found at http://www.stat.columbia.edu/~gelman/bugsR/runningbugs.html . Can anyone help me to figure out what's
2012 Jul 13
3
R2OpenBUGS quesion
Dear All: Could anybody help me figure out why I get the Error message below while I running the example code of bugs() function in R2OpenBUGS packages? I have tried the code both in Win 7 and Ubuntu 12.04, but they show the same message. My R version is 2.15.1 in win7 and 2.15.0 in Ubuntu. Many thanks ! Best, Yilong > schools.sim <- bugs(data, inits, parameters, model.file,+
2013 Jan 03
1
R2OpenBUGS question with differential equations
Dear All,   Currently I am running the following code:   library(stats4) library(odesolve) library(rgenoud) Input<-data.frame(SUB=c(1),time=c(0.5,3,10,15),lev=c(2.05,12.08,9.02,8)) XD<-500 IT<-3 diffeqfun<-function(time, y, parms) {   if(time<=IT)      dCpdt <- (XD/IT)/parms["Vol"] -
2008 Dec 09
1
expected variable name error pos 98349 WInBUGS in R
> I am using a random intercept model with SITEID as random and NAUSEA as > outcome. > > I tried using a dataset without missing values and changed my model > statement accordingly but still get the same error. Follwoing in an excerpt. > > anal.data <- read.table("nausea.txt", header=T, sep="\t") > > list(names(anal.data)) > [[1]] > [1]
2007 Aug 06
2
Makefile for embedding OpenBUGS in R package
Dear list, I'm trying to embed OpenBUGS in an R package for use of it on 64-bit Linux. In order to get the CLI working one has to compile C code contained in $OpenBUGS/Manuals/CBugs.html (copied to say CBugs.c) using gcc -m32 -o bugs CBugs.c -ldl I put the OpenBUGS distribution in the ./inst subdirectory of the package root. Where should I now put the CBugs.c and how