Questions tagged [simulation]

A vast area which includes generating results from computer models.

507 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
6
votes
0answers
32 views

Simulate correlate random variables with given marginal distribution where one is always larger

Is it possible to simulate pairs of random variables with a given marginal distribution and population correlation where one random variable is larger than the other? More formally, I need to simulate ...
6
votes
0answers
183 views

Simulate Gaussian variables conditional on their sum of squares

Consider a $d$-dimensional Gaussian random vector $\mathbf{Z}=[Z_i]_i$ with mean $\boldsymbol{\mu}$ and covariance matrix $\boldsymbol{\Sigma}$. What would be the more efficient method(s) to simulate $...
6
votes
0answers
289 views

Copulas for generating uniform random variables with correlations

I want to generate uniform random variables which have a correlation structure defined by a graph i.e. a variable is only correlated with its neighbors in the graph and is uncorrelated with the rest ...
6
votes
0answers
589 views

Skew of p-value distribution under composite null hypotheses

On this page it says ...if HA holds, the p-values have a distribution for which values near 0 are more likely than values near 1. However the p-values may have a distribution that is not ...
6
votes
0answers
418 views

Generating random matrices with specific equality constraints

Suppose I want to generate a nonnegative $n \times n$ matrix $\mathbf A$ for an odd $n$ (say, $n=5$ for a good enough example), such that the individual elements are drawn from a uniform distribution ...
6
votes
1answer
678 views

Generate Posterior predictive distribution at every step in the MCMC chain for a hierarchical regression model

I'm trying to fit a Bayesian Hierarchical regression model with a random correlated coefficients using R ,I'm using data having 160 groups (schools) to fit a model of math score as a function of one ...
5
votes
0answers
52 views

In sports modelling, are hot simulations better or cold simulations?

I'm thinking here largely of the context in which someone has an Elo rating model for a particular sport. To calculate things such as how often the team makes the Finals series, or wins the ...
5
votes
1answer
271 views

How do I simulate a random valid correlation matrix of ordinal variables given a list of marginal probabilities?

I am trying to use R to simulate random variations in a real dataset with a known number of categorical and continuous predictor variables, as well as known marginal probabilities for each ordinal/...
5
votes
0answers
329 views

Interpolation and Sample size when Visualizing distributions

Let's assume a stochastic simulation or test with a control variable. The task is to visualize the distribution to demonstrate the effect that is being researched. The objective is to get smooth plot, ...
4
votes
1answer
69 views

Electoral college simulation using SQL Server

As I'm sure will be apparent to most here, I'm not a statistician or a programmer, but one of my hobbies is politics. I've created a (very simple) USA electoral college simulation, seen below. The ...
4
votes
0answers
40 views

Bootstrapping for Control Variates

TLDR: I want to do Monte Carlo with control variates I work in the setting where you use Monte Carlo sampling to approximate the optimal coefficients for the control variates. I want to retain the ...
4
votes
0answers
85 views

What is a reasonable alternative when the mean does not exist?

Consider a continuous random variable $F''$ following a doubly noncentral $F$ distribution with $8$ and $2$ degrees of freedom, and noncentrality parameters $0$ and $10$; which is to say: $$ F'' \sim ...
4
votes
0answers
214 views

How closely related are the Gelman-Rubin statistic and the autocorrelation length?

When monitoring the convergence of parallel MCMC chains, some people measure the autocorrelation length, others the Gelman-Rubin statistic. (There are others who use some other statistic and still ...
4
votes
0answers
522 views

Simulate event rate in logistic regression - Finding the intercept

I want to simulate a logistic regression (using a set of continous and binary confounders with known odds ratios) with a specified probability outcome (e.g. event rate = 0.2). This is actually a ...
4
votes
0answers
223 views

Quantile regression - power analysis

I need to put together a (likely simulation-based) power analysis of a quantile regression. The analysis should include changing effect size (increasing slope). In ...
4
votes
0answers
164 views

Select ellipsoid data cloud “equivalent” to a spherical data cloud

What will be your considerations when you've got to realize the intuitively plain, but meditatively manifold idea to create a data cloud which "the same as" that data cloud, only that it is not ...
4
votes
0answers
682 views

How to Validate a Monte Carlo Simulation

I have historical data of a production process, and I've being asked to build a simulation model to predict its performance in the future. Using the historical data, I've being able to obtain the ...
4
votes
0answers
966 views

Iman-Conover rank correlation method & multivariate normal distribution

I am working on some simulations using the Iman-Conover method to sample correlated random variables so I can have a 'population' Spearman correlation parameter as opposed to a Pearson correlation (...
4
votes
0answers
342 views

How to simulate data with values of Mardia's Kurtosis?

I have two (related) questions regarding the simulation of correlated, non-normal data with a user-specified value of Mardia’s 1970 multivariate kurtosis. (1) It is very common in my field to use ...
4
votes
0answers
3k views

How does the sim() function in the arm package determine non-informative priors?

The arm package includes the sim() function. On its R help page it states: ...
4
votes
0answers
899 views

Simulation for power analysis for higher order repeated measures ANOVA

I am attempting to find a way to perform a power analysis for a higher order repeated measures ANOVA where all factors are within-subjects (i.e., there are no between-subjects factors). I have looked ...
4
votes
0answers
157 views

Is there anything special about Gamma distribution with the shape parameter k=e?

Is there any unique property of $\mathrm{Gamma}(k=e, \text{ scale})$ or a Negative binomial distribution with $r=e$? Here, $e$ is Euler's number, $e \approx 2.71828$. The reason I'm asking is that ...
4
votes
0answers
356 views

Convergence theorem for Gibbs sampling

The convergence theorem for Gibbs sampling states: Given a random vector $X$ with components $X_1,X_2,...X_K$ and the knowledge about the conditional distribution of $X_k$ we can find the actual ...
4
votes
0answers
183 views

What is the canonical example which show advantage of robust linear regression over LS linear regression?

What is the canonical example which show situation when robust linear regression has advantage over least square linear regression ? I was trying to simulate situation when some errors (20% of them) ...
4
votes
0answers
288 views

Methodology for validation of stochastic simulations with Kolmogorov-Smirnov test

I'm a phd student in Geography, i need some help (or good ressources) to understand why and when i need to use PIT (Probability integral transform) in my validation program for simulation. I explain ...
4
votes
0answers
194 views

Set of data and averaging/standard deviation

I have a set of data (positive real numbers < 1) in five categories. My aim is to show that the data in the last category is bigger than the other categories for a range of examples (the data set), ...
4
votes
0answers
1k views

Simulate Arellano-Bond

I have fitted a dynamic panel data model with Arellano-Bond estimator in gretl, here is the output: ...
3
votes
0answers
35 views

Escape unsuccessful accept-reject step in MCMC

I have an MCMC procedure that samples latent variables $h_1, \dots, h_T$. It is based on Shephard and Pitt (1997), https://doi.org/10.1093/biomet/84.3.653. Let $f$ be the true conditional posterior ...
3
votes
1answer
37 views

Sampling from conditional multivariate normal distribution (“conditioned on ellipses” / stratified sampling)

I have an issue related to stratified sampling. To explain, I need to start with one-dimensional case: Let $N\sim \mathcal{N}(0,1)$, i.e., a standard normal variable with cdf $F$. Partition $\mathbb{R}...
3
votes
1answer
53 views

Create tsData with specific ARIMA coefficients

Suppose for a time series, the arima output is: ...
3
votes
0answers
53 views

antagonistic simulated annealing

Simulated annealing aims at a series of target distributions $$\pi_T(x)\propto\exp\{T\,H(x)\}$$ to find the maximum of the function $H$ and its argument $$\arg_x\max_{x\in \mathfrak X} H(x)$$ if the ...
3
votes
0answers
17 views

Visualization of unbiasedness of high dimensional paramter estimates

Assume a statistical model $f_{\theta}(X)$ that allows to estimate a parameter vector $\hat{\theta}\in \mathbb{R}^p$ from data $X$ and assume that $p$ is high dimensional (you may assume something ...
3
votes
0answers
36 views

Efficient simulation for distribution of time until coin toss pattern

Suppose we flip a biased coin (with probability $p$ being Heads) repeatedly until a certain pattern (e.g., HHHTT) appears. We are interested in the number of flips $N$ required. It is well-known that $...
3
votes
0answers
71 views

Adaptive selection of Mass values in Hamiltonian Monte-Carlo?

I know there are good solutions for adaptive selection of path lengths and step-size for Hamiltonian Monte-Carlo (e.g. the NUTS sampler), but for the sampler to work efficiently we also require that ...
3
votes
1answer
346 views

Simulation of low rank and sparse matrix

I am having trouble simulating a matrix which is low rank and sparse (sparse along both rows and columns). One way to simulate a low-rank matrix is by generating a random matrix, then taking SVD and ...
3
votes
0answers
71 views

simulate autoregressive data that is also multivariate normal

I am trying to simulate data that is correlated to varying degrees. However, the data itself will have a degree of autocorrelation as well. I can get the first part of the problem with mvrnorm ...
3
votes
0answers
32 views

Is it possible to use an estimated Likelihood without summary statistics for MCMC sampling?

I am currently trying to perform MCMC sampling using a (stochastic) model, for which I cannot derive a likelihood function, but which allows me to draw samples $y_\theta \sim p_{y|\theta}$, where $p_{...
3
votes
1answer
115 views

Expected Value of this game

I've got a game that can be described by flipping coins over 7 days. Every day I get a number of coins described by a Poisson distribution. Each coin flips heads with probability $p$, and if I succeed,...
3
votes
0answers
321 views

Using a copula to generate correlated data draws; attenuation bias in result correlation

I would like to generate correlated data draws across two unrelated distributions (or across two empirical datasets that are from unknown distributions). The correct way to do this is to use a copula. ...
3
votes
0answers
68 views

Framework for simulating SEM data w/ moderation + mediation, testing models

I'm interested in extrapolating treatment effects from RCTs to new populations under conditions where populations exhibit relevant differences that induce differences in treatment effects. My aim is ...
3
votes
0answers
159 views

Multi-agent reinforcement learning: An introduction

I would like to make a Tic-Tac-Toe game with 10X10 board and I want to have 2 agents playing against each other and learning to play from interaction. A naive approach could be taken - to simply let ...
3
votes
0answers
219 views

Testing whether a process is Wiener process

Ideally I would like links to code implementations (eg. Matlab ) or book references, but I would appreciate suggestions on various methods. We start with sampled process $X_{t}$. A straightforward ...
3
votes
0answers
78 views

UP/DOWN Run test: How to determine the Matrix $A$

A test statistic for a UP/DOWN run is defined in Donald E. Knuth, The Art of Computer Programming Volume 2, 1998, pp. 66-.: $V= \frac{1}{n} \sum_{i,j\ <=m} \ (COUNT(i)-nb_i)(COUNT(j)-b_j)a_{ij}$ ...
3
votes
0answers
136 views

Methods for smearing multidimensional data

I have a dataset $X \in \mathbb{R}^{2p}$. Half of the parameters $X_{pre} \in \mathbb{R}^p$ represent true values without measurement biases or errors. The other half $X_{post} \in \mathbb{R}^p$ are ...
3
votes
0answers
161 views

Sampling discrete distributions given their entropy

Can we (uniformly) generate a discrete random variable over $n$ possible outcomes given its entropy? I am interested in non-parametric methods, that do not require the random variable to follow a ...
3
votes
0answers
274 views

Simulating from an Inverse Wishart with constraints

Let $\Sigma$ be a $p\times p$ positive definite matrix and $\nu>p-1$. I would like to simulate a realization of the Inverse-Wishart distribution $X\sim\mathcal W^{-1}(\Sigma, \nu)$ with the ...
3
votes
1answer
954 views

How to calculate MSE in a quantile regression simulation study

I am working on a simulation study on quantile regression. So what I did is to simulate data based on a given model, which is different from the true underlying model of the data, in other words, a ...
3
votes
0answers
183 views

Residuals in Negative Binomial Data

I'm tackling the problem of Anomaly Detection in a dataset that's comprised of call counts to a call-centre. The data exhibits daily and weekly seasonality and is known to be over-dispersed. ...
3
votes
0answers
208 views

Comparing neuron “jitter” values across trials

I'm asking this question on the statistics forum because I'm wondering a bit about drawing appropriate conclusions supported by statistics from skewed data (if it belongs on another area of stack ...
3
votes
0answers
74 views

Indirect solution for maximum entropy through sampling?

Is there a way to sample from a finite set $\{A,B,C,D\}$ such that the limiting empirical proportions converges to the maximum entropy solution of their probabilities consistent with known constraints?...

1
2 3 4 5
11