similar to: How do you create a "MCMC" object?

Displaying 20 results from an estimated 1100 matches similar to: "How do you create a "MCMC" object?"

2004 Feb 17
0
A log on Bayesian statistics, stochastic cost frontier, montecarl o markov chains, bayesian P-values
Dear friends, Over the past weeks, I have been asking a lot of questions about how to use R in Bayesian analysis. I am brand new to R, but I am very pleased with it. I started with winbugs but I found winbugs to be a limited software, not bad but has several limitations. By contrast, R allows the analyst to tackle any problem with a huge set of tools for any kind of analysis. I love R. In
2004 Feb 05
5
rgamma question
I was trying to generate random numbers with a gamma distribution. In R the function is: rgamma(n, shape, rate = 1, scale = 1/rate). My question is that if X~gamma(alpha, beta) and I want to generate one random number where do I plug alpha and beta in rgamma? and, what is the meaning and use of rate? Thanks for your attention, Jorge [[alternative HTML version deleted]]
2004 Mar 04
1
Gelman-Rubin Convergence test
Dear friends, I run the Gelman-Rubin Convergence test for a MCMC object I have and I got the following result Multivariate psrf 1.07+0i, What does this mean? I guess (if I am not mistaken) that I should get a psrf close to 1.00 but what is 1.07+0i? Is that convergence or something else? Jorge [[alternative HTML version deleted]]
2010 May 23
2
Subsetting with a list of vectors
Hi, I have a dataset that looks like the one below. data plot plantno. species H 31 ABC D 2 DEF Y 54 GFE E 12 ERF Y 98 FVD H 4 JKU J 7 JFG A 55 EGD . . . . . . .
2018 Mar 15
3
stats 'dist' euclidean distance calculation
Hello, I am working with a matrix of multilocus genotypes for ~180 individual snail samples, with substantial missing data. I am trying to calculate the pairwise genetic distance between individuals using the stats package 'dist' function, using euclidean distance. I took a subset of this dataset (3 samples x 3 loci) to test how euclidean distance is calculated: 3x3 subset used
2008 Mar 15
2
Please find the error in my code
hello everybody I use the following code for my programming & it runs with the error as specified below.Any help that would disolve the error will be highly appreciated. Thanks in advance my code looks like this #### R programme for simulating the power of the two sample t test vs various #### non-parametric alternatives sim.size <- 200 sample.size <- 10 set.seed(231) mu1 <- 0 delta
2011 Jun 21
2
interaction between categorical variables
Dear R-users, I need some  assistance. I am running some interactive variables for categorical variables. I have dgen(2 levels converted to dummy variables)  and dtoe(4-levels also converted to  dummy variables). So I have worked with them in two ways: i created a variable X1 = dgen*dtoe  and I get an error "Error in dgen * dtoe : non-conformable arrays"then i run a glm, binomial
2004 Feb 11
0
gelman.diag question
Dear Friends, I am trying to use the gelman-rubin convergence test. I generated a matrix samp[10,000x86] with the gibbs sampler. the test requires the creation of "mcmc" objects. Since I don't know how to define samp as a "mcmc" object, I tried to create one mcmc object by means of the mcmc() function. With this function I tried to create a mcmc object dul from samp but I
2006 Nov 09
1
dissimilarity matrices
Dear All, I have a dissimilarity matrix which I happily convert to a distance object by running: X <- as.dist(Y) and I can happily now run either hclust(X) or agnes(X). So that the various bits of output are labelled correctly I would dearly like to be able to give names to the columns and rows of X, as would happen if I ran: mydata<-read.table("clipboard",header=T)
2018 Mar 15
0
stats 'dist' euclidean distance calculation
> 3x3 subset used > Locus1 Locus2 Locus3 > Samp1 GG <NA> GG > Samp2 AG CA GA > Samp3 AG CA GG > > The euclidean distance function is defined as: sqrt(sum((x_i - y_i)^2)) My > assumption was that the difference between
2004 Feb 16
0
How do we obtain Posterior Predictive (Bayesian) P-values in R (a sking a second time)
Dear Friends, According to Gelman et al (2003), "...Bayesian P-values are defined as the probability that the replicated data could be more extreme than the observed data, as measured by the test quantity p=pr[T(y_rep,tetha) >= T(y,tetha)|y]..." where p=Bayesian P-value, T=test statistics, y_rep=data from replicated experiment, y=data from original experiment, tetha=the function
2010 Jul 06
2
Help With ANOVA
Hi I needed some help with ANOVA I have a problem with My ANOVA analysis. I have a dataset with a known ANOVA p-value, however I can not seem to re-create it in R. I have created a list (zzzanova) which contains 1)Intensity Values 2)Group Number (6 Different Groups) 3)Sample Number (54 different samples) this is created by the script in Appendix 1 I then conduct ANOVA with the command >
2007 Mar 12
2
Lmer Mcmc Summary and p values
Dear R users I am trying to obtain p-values for (quasi)poisson lmer models, including Markov-chain Monte Carlo sampling and the command summary. > > My problems is that p values derived from both these methods are totally different. My question is (1) there a bug in my code and > (2) How can I proceed, left with these uncertainties in the estimations of > the p-values? > > Below
2007 May 11
0
incorrect MCMC CIs in pvals.fnc (languageR) ?
library(lme4) library(coda) library(languageR) fit = lmer(Reaction~Days + (1|Subject) + (0+Days|Subject), data=sleepstudy) pvals.fnc(fit)$random # compare with... samp = mcmcsamp(fit, n=10000, trans=FALSE) HPDinterval(samp) densityplot(samp, plot=F) # 'pvals.fnc' reports sigma instead of sigma^2, but it looks like the # Sbjc.(In) and Sbjc.Days are also sqrt compared with the
2010 Sep 29
1
sample exponential r.v. by MCMC
Dear R users, I am leaning MCMC sampling, and have a problem while trying to sample exponential r.v.'s via the following code: samp <- MCMCmetrop1R(dexp, theta.init=1, rate=2, mcmc=5000, burnin=500, thin=10, verbose=500, logfun=FALSE) I tried other distribtions such as Normal, Gamma with shape>1, it works perfectly fine. Can someon
2010 Mar 09
3
Help with ANOVA in R
Hi I am attempting Anova analysis to compare results from four groups (Samp1-4) which are lists of intensities from the experiment. I am doing this by first creating a structured list of the data and then conducting the ANOVA (Script provided below). Im an R beginner so am not sure if I am using this correctly. Two major questions I have are: 1) Is using the code (zzz.aov <- aov(Intensity ~
2007 Nov 26
2
Filling in a Zero Matrix
Hi I am very new to R and statistical programming in general. I am trying to reorder data from a .csv file. I have managed to import the data and create a zero matrix. I am now trying to fill the matrix. There seems to be some problem with this section of my code. I have highlighted the dodgy code in red. Please help if possible. ###################################################### ###########
2009 Oct 14
2
Getting indeices of intersecting elements.
Hi, Is there a command to get the indices of intersecting elements of two vectors as intersect() will give the elements and not its indices. Thanks in advance. Praveen Surendran School of Medicine and Medical Sciences University College Dublin Belfield, Dublin 4 Ireland. [[alternative HTML version deleted]]
2007 Feb 17
0
MCMC Pack Crashes R-GUI session (PR#9516)
Full_Name: Lloyd Lubet Version: 2.4.1rc OS: XP Submission from: (NULL) (65.19.17.17) Dear Andrew, I am trying to learn gibbs sampling and Metropolis. When I run your gibbs version of multiple linear regression my session crashes. I have trimmed the dataframe and set my object.size = 1 gigB. Despite my best efforts it still crashes while advising me to contact the MCMC Pack developement team.
2004 Apr 19
0
New package: mcgibbsit, an MCMC run length diagnostic
Package: mcgibbsit Title: Warnes and Raftery's MCGibbsit MCMC diagnostic Version: 1.0 Author: Gregory R. Warnes <gregory_r_warnes at groton.pfizer.com> Description: mcgibbsit provides an implementation of Warnes & Raftery's MCGibbsit run-length diagnostic for a set of (not-necessarily independent) MCMC sampers. It combines the estimate error-bounding approach of Raftery