3

Short answer: this is a code error. If I use the log scale, should I also use a log-proposal? The probability of acceptance is always $$\min\left\{1,\dfrac{\pi(x^\text{new})}{\pi(x^\text{old})}\times\dfrac{q(x^\text{old}|x^\text{new})}{q(x^\text{new}|x^\text{old})} \right\}$$ which can also be written as $$\min\left\{1,\exp[\ln\pi(x^\text{new})-\ln\...


3

MCMC relies on building a Markov chain whose stationary distribution is a joint distribution you wish to sample from. But you don't start at the stationary distribution, you start at some initial value (in multivariate space). It may take some time for the process to "wash out" the initial conditions. Under suitable conditions the approach to the ...


3

The bisection method is guaranteed to work even for such discontinuous $F^{-1},$ provided it is suitably implemented. Here is pseudocode (that actually works in R): function(f, x, tol=1e-8, ...) { u <- 1 l <- 0 repeat { m <- (u + l) / 2 if (f(m, ...) - x <= 0) l <- m else u <- m if (u - l <= tol) break # (See the end ...


2

So basically your problem is that you don't know what the future will bring, in your case how the number of likes for a tweet will develop after you collected the data. Welcome to the club... All we can do when it comes to predicting is to give our best guess and be ready to be wrong. It is logically impossible to get an empirical foundation for a prediction ...


2

The question is too vague in my opinion as there must be constraints on the transforms $\varphi_1$ and $\varphi_2$ for this to happen. Namely that the realised value of $X_1$ as $x=\varphi_1(u)$ must be a possible value of $X_2$ as well, namely that $x$ must belong to the support of $X_2$ for a $v$ such that $x=\varphi_2(v)$ to exist. With this constraint ...


2

Since you're sampling without replacement, the events are not independent. You have to condition the second event on outcome of the first one. For example, p(s1 in the 1st draw and s3 in the 2nd draw) is calculated as p(s1 in the 1st draw) $*$ p(s3 in the 2nd draw | s1 in the first draw). This is because the probability of getting s3 on the 2nd draw ...


1

Obs (call it $X$) is a RV that takes values $4$ and $0$ with probabilities $\pi/4$ and $1-\pi/4$ respectively. Expected value of it is $\pi$. Variance of it is $$E[X^2]=16\times\pi/4=4\pi\rightarrow \operatorname{var}(X)=4\pi-\pi^2=\pi(4-\pi)$$ And, the deviation is $\sigma(X)=\sqrt{\pi(4-\pi)}\approx 1.64$. I'm not sure why you calculate this deviation but ...


1

In MCMC methods, you typically sample from partially known (as also pointed out in the comments section) distributions. Knowing its form up to a scalar (i.e. constant wrt $\theta$) is enough. Therefore, MCMC can also be used to approximate integrals by implicitly calculating the normalization constant. For example, you probably won't be able to calculate the ...


1

When using logarithmic sampling, it means that you are sampling uniformly on the log-transformed interval. Here are 20 random values logarithmically sampled between 0 and 10: And here are those same values plotted on the log-axis: So, quick answer, small values are sampled more frequently!


1

One way you could approximate this is to draw a large random sample from your target distribution, find the nearest neighbors of your fixed samples, and replace those "nearby" random samples with the fixed samples. This would require a large enough sample to ensure that each fixed point has a neighbor that's "reasonably" close, how close that needs to be ...


1

1) What is p and how can I understand it intuitively with an example? You answered your own question here. "p as a sample proportion or as estimated proportion of an attribute that is present in the population" If example if you want to estimate the percentage of women attending the University, that would be equal to p and 1-p is the percentage of men ...


1

It is not random since only some people take flyers. this is one of the problems of social studies, picking the sample that represents the population is really hard. You have here two problems: Only some people take the flyers The recollection of information is geographically biased


1

Simulated annealing and Gibbs sampling share the same tool of using a Markov chain to explore the surface of a target function, $f$, but the former aims at finding the global maximum while the latter intends to visit the entire surface in proportion to the altitude. Simulated annealing should thus converge to a single point (assuming there is a single ...


1

There isn't a general problem with three-stage designs in svydesign. Here's a made-up example where the analysis all works, with three stages, with finite population corrections, and with three approaches to weighting. First, weights just calculated from the fpcs. Second, weights supplied, but equal to those you'd get from the fpcs. Third, weights supplied ...


Only top voted, non community-wiki answers of a minimum length are eligible