similar to: Comparing posterior and likelihood estimates for proportions (off topic)

Displaying 20 results from an estimated 2000 matches similar to: "Comparing posterior and likelihood estimates for proportions (off topic)"

2011 Oct 17
1
Best practices for handling very small numbers?
Greetings I have been experimenting with sampling from posterior distributions using R. Assume that I have the following observations from a normal distribution, with an unscaled joint likelihood function: normsamples = rnorm(1000,8,3) joint_likelihood = function(observations, mean, sigma){ return((sigma ^ (-1 * length(observations))) * exp(-0.5 * sum( ((observations - mean ) ^ 2)) / (sigma
2013 May 08
1
How to calculate Hightest Posterior Density (HPD) of coeficients in a simple regression (lm) in R?
Hi! I am trying to calculate HPD for the coeficients of regression models fitted with lm or lmrob in R, pretty much in the same way that can be accomplished by the association of mcmcsamp and HPDinterval functions for multilevel models fitted with lmer. Can anyone point me in the right direction on which packages/how to implement this? Thanks for your time! R. [[alternative HTML version
2004 Jan 23
1
predict.lda problem with posterior probabilities
With predict.lda the posterior probabilities only relate to the existing Class definitions. This is fine for Class definitions like gender but it is a problem when new data does not necessarily belong to an existing Class. Is there a classification method that gives posterior probabilities for Class membership and does not assume the new data must belong to one of the existing Classes? A new
2008 Dec 31
3
WinBUGS posterior samples (via R2WinBUGS)?
Hi all, I did some analysis using package R2WinBUGS to call WinBUGS. I set the iterations to 50000 (fairly a large number, I think), but after the program was done, the effective posterior samples contained only 7 draws. I don't know why. By the way, I checked posterior sample size by using bugsobj$n.sims. And, for my previous practice with WinBUGS/R2WinBUGS, no such strange thing happend.
2013 Feb 18
1
compare posterior samples from R2OpenBugs and R function bugs{R2WinBUGS}
Hi all, I used both OpenBugs and R function bugs{R2WinBUGS} to run a linear mixed effects model based on the same data set and initial values. I got the same summary statistics but different posterior samples. However, if I order these two sets of samples, one is generated from OpenBugs and the other is generated from R, they turn to be the same. And the samples from R do not have any
2004 Apr 27
5
p-values
I apologize if this question is not completely appropriate for this list. I have been using SAS for a while and am now in the process of learning some C and R as a part of my graduate studies. All of the statistical packages I have used generally yield p-values as a default output to standard procedures. This week I have been reading "Testing Precise Hypotheses" by J.O. Berger
2011 Sep 19
2
Poisson-Gamma computation (parameters and likelihood)
Good afternoon/morning readers. This is the first time I am trying to run some Bayesian computation in R, and am experiencing a few problems. I am working on a Poisson model for cancer rates which has a conjugate Gamma prior. 1) The first question is precisely how I work out the parameters. #Suppose I assign values to theta with *seq()* *theta<-seq(0,1,len=500)* #Then I try out the
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
2008 Sep 27
0
compute posterior mean by numerical integration
Dear R useRs, i try to compute the posterior mean for the parameters omega and beta for the following posterior density. I have simulated data where i know that the true values of omega=12 and beta=0.01. With the function postMeanOmega and postMeanBeta i wanted to compute the mean values of omega and beta by numerical integration, but instead of omega=12 and beta=0.01 i get omega=11.49574 and
2008 Dec 05
0
making sense of posterior statistics in the deal package
Hello, I'm doing bayesian network analyses with the deal package. I am at a loss for how to interpret output from the analysis (i.e. what is a good score, what is a bad score, which stats tell me what about the network edges/nodes). Here is an example node with its posterior scores for all parent nodes. ------------------------------------------------------------ Conditional Posterior:
2006 Nov 19
0
posterior probability formula in predict.lda
IHi all, have a dataset with rows as plots and environmental data as columns. I have predicted the values using the following ed.pred<-predict(lda.ed,ed) #lda.ed the model, ed the env. variables used for the prediction plots I am wanting to know the formula used by predict.lda for calculating the posterior probabilities. Can anyone point me in the right direction? Thanks
2008 Jan 24
0
posterior probability in finite mixture
Dear All, This is a question somewhat off-topic. Say, if I have known the number of components in the mixture, all the estimated parameters, prior probabilities, and so on for a finite mixture model, how might I compute the posterior probabilities of each case for a new dataset without observed response (Y)? I want to know the parametric form of such calculation such that I can calculate it
2013 Feb 01
2
help on proportions
Hi: Apologies for asking the following question. As?this may sound very basic and stupid for this forum?, I honestly do not know how to solve it and I do not have a teacher who can help me understand. ? I have list of genes (200)?that are involved in a particular process and I call this as a?ProcSet.?? From an independent experiment I found that out of 10,000 genes, 1500 are significant and I
2008 Apr 13
1
plotting muliple CI ellipses for EB estimates
I have empirical Bayes estimates for slopes and intercepts for a number of subjects and I would like to plot the slopes and intercepts with confidence ellipses. These ellipses would be based on the confidence intervals for the slope and intercepts (forming the major and minor axis of each ellipse), and the correlation in the slope and intercepts. The ellipse function in the car library
2010 Jul 18
2
loop troubles
Hi all, I appreciate the help this list has given me before. I have a question which has been perplexing me. I have been working on doing a Bayesian calculating inserting studies sequentially after using a non-informative prior to get a meta-analysis type result. I created a function using three iterations of this, my code is below. I insert prior mean and precision (I add precision manually
2012 Aug 05
1
Possible bug with MCMCpack metropolis sampler
Hi, I'm having issues with what I believe is a bug in the MCMCpack's MCMCmetrop1R function. I have code that basically looks like this: posterior.sampler <- function(data, prior.mu){ log.posterior <- function(theta) log.likelihood(data, theta) + log.prior(prior.mu, theta) post.samples <- MCMCmetrop1R(log.posterior, theta.init=prior.mu, burnin=100, mcmc=1000, thin=40,
2007 Apr 03
1
Calculating DIC from MCMC output
Greetings all, I'm a newcomer to Bayesian stats, and I'm trying to calculate the Deviance Information Criterion "by hand" from some MCMC output. However, having consulted several sources, I am left confused as to the exact terms to use. The most common formula can be written as DIC = 2*Mean(Deviance over the whole sampled posterior distribution) - Deviance(Mean
2010 Sep 30
1
Accessing Vector of A Data Frame
I have a variable that looks like this: > print(pred$posterior) o x 1 2.356964e-03 9.976430e-01 2 8.988153e-01 1.011847e-01 3 9.466137e-01 5.338627e-02 4 2.731429e-11 1.000000e+00 Now what I want to do is to access "o" and "x" How come this approach fail? > print(pred$posterior$o) or >
2018 May 03
1
MCMCglmm - metric of the estimates
Hi, my question is probably amateurish but I can't seem to find the answer anywhere. In what metric are the MCMCglmm package's posterior means for family = "categorical"? I suppose that they can't be odds ratios and probabilites as my numbers are outside their bounds. So I'm thinking ? are they just basic regression coefficients conceptually equal to those obtained by
2007 Jan 26
1
Bayesian inference: Poisson distribution with normal (!) prior
Hello, for a frequency modelling problem I want to combine expert knowledge with incoming real-life data (which is not available up to now). The frequency has to be modelled with a poisson distribution. The parameter lambda has to be normal distributed (for certain reasons we did not NOT choose gamma althoug it would make everything easier). I've started with the subsequent two functions to