A vast area which includes generating results from computer models.

learn more… | top users | synonyms

0
votes
1answer
7 views

How to simulate or draw samples from a Poisson process?

The Poisson process $N(t)$ counts the number of jumps that occur at or before time $t$. And I want to how can I draw a random sample or simulate from a Poisson process. I read from a textbook that ...
3
votes
1answer
193 views

How to generate a specific number of random binaries with probablities proportional to given values?

I have such a matrix in an excel sheet. It has 140 cells. I want to generate 20 binaries randomly. However, the probability of generating "1" in each cell is proportional to cell's value. Namely, ...
4
votes
1answer
97 views

Variance reduction technique in Monte Carlo integration

I have some trouble understanding the variance reduction method called "Antithetic variables": Suppose that the integrand is $g(x)=x^2$ and the reference density $f(x)=e^{-x}I_{[0,\infty]}$ is ...
5
votes
1answer
34 views

Generating Binomial Random Variables with given Correlation

Suppose I know how to generate independent Binomial Random Variables. How can I generate two random variables $X$ and $Y$ such that $X\in Bin(8,\dfrac{2}{3})$, $Y\in Bin(18,\dfrac{2}{3})$ and ...
-1
votes
0answers
15 views

Markov Chain Monte Carlo Simulation [closed]

How will you simulate weather data using historical data in R using MCMC simulation given for example 5 years of daily rainfall?
0
votes
0answers
13 views

Convert Variance-Covariance Matrix for Regression Coefficients to Correlation Matrix

Not sure if there is a previous post on this topic, but I need to convert the variance-covariance matrix of regression coefficients $V(\boldsymbol{\beta})$ to a correlation matrix ...
3
votes
0answers
40 views

simulating birth death process with random numbers from negative binomial

I am trying to generate random deviates for the population size at time $t$ for a birth-death process with constant birth and death rates per individual and initial size $N_0 \ne 0$. For the simple ...
1
vote
0answers
11 views

Simulating Correlated Normal Random Variables Given Uniforms

I want to simulate $3$ Normal random variables given their expectations, variances, correlations and three independent uniform $(0,1)$ observations. Is my method correct? First, produce three ...
0
votes
1answer
40 views

How to translate percentage decline into a regression slope?

I want to model a negative relationship of count/binary data over 10 years with a known value for the decline rate (in percentage). However, I have problems in calculating the correct slope value for ...
3
votes
0answers
21 views

Simplification of my Hasting-Metropolis ratio

I am considering the following model : $$ y_{i,j} = f(x_{i,j},\beta,b_{i},d) + \varepsilon_{i,j} $$ where : $1 \leq i \leq s$ $1 \leq j \leq n_{s}$ $\beta$ is a (vector of) fixed effects $b_{i} ...
1
vote
0answers
11 views

How to determine how many simulations to run, in order to illustrate “extreme-valued statistics”?

As an engineer trying to learn statistics, I wonder if someone could please recommend references / a statistical method that may assist with determining the number of simulations that need to be ...
1
vote
1answer
23 views

How to incorporate parameter constraints in Metropolis Hastings

I am working on parameter estimation of GARCH model with Metropolis Hastings. But the results I have got doesn't look reasonable, actually it is quite different from what I have got from Gibbs ...
2
votes
2answers
30 views

Why is simulation used for probit choice probabilities?

As explained in this answer, the probability of a certain outcome in a Logit model can be written as $$ P=\int_{\varepsilon=-\beta'x}^{\infty} f(\varepsilon)d\varepsilon\\ = 1- F(-\beta'x) = ...
5
votes
1answer
50 views

Simulate from a truncated mixture normal distribution

I want to simulate a sample from a mixture normal distribution such that $$p\times\mathcal{N}(\mu_1,\sigma_1^2) + (1-p)\times\mathcal{N}(\mu_2,\sigma_2^2) $$ is restricted to the interval $[0,1]$ ...
0
votes
0answers
32 views

How to generate multidimensional data with specific clustering properties?

In section 5.A of a research paper the researcher used the following synthetic datasets: GAUSS consisted of six Gaussian clusters with identity covariance, each with 500 points in five dimensions. ...
2
votes
0answers
49 views

Omitted Variable Bias in Linear Regression - Simulation

Is the following a reasonable illustration of the OVB problem? We build up fictional data around the regression line: $$y = 7.2 + 2.3 \, x_1 + 0.1 \, x_2 + 1.5 \, x_3 + 0.013 \, x_4 + eps$$ by ...
2
votes
1answer
18 views

Correlation of one random variable and a binary variable dependent on it

I create one normal random variable using =NORM.S.INV(RAND()) in Excel and a binary variable =IF(B2>=0,1,0), where B2 is this random variable. If I continously resample, I find that their correlation ...
0
votes
0answers
19 views

Differencing a series and back

I've followed this procedure: I have a non-stationary process (call it 'series_1'), which I try to render stationary by differencing. The largest value of the process (8760 observations) is about ...
2
votes
1answer
64 views

simulate t-tests of mean differences

I would like to simulate t-tests of mean differences. I would like to simulate data based on 1) pre-specified (desired) mean difference between the variables and 2) desired t value 3) and p-value ...
0
votes
1answer
33 views

Simulating a dynamical system

Basically I need to replicate Hartley's 'A User's Guide to Solving Real Business Cycle Models' . Specifically (to make question relevant to stats.stackexchange), I want to simulate the dynamical ...
0
votes
0answers
21 views

transforming simulated data to have the desired mean and variance [duplicate]

I am working on simulation of data, and this is just the first step of what I am trying to do. I am first simulating data based on a correlation matrix (as this is what I want). I used the R code ...
1
vote
1answer
61 views

Power analysis for binomial test via simulation

Suppose a gene is mutated in 30% of the samples. I want plot the number of samples required to see 30% of them mutated at various level of power. I want to do this through a simulation so I ...
2
votes
1answer
49 views

How to draw a random sample from a Generalized Beta distribution of the second kind

For microsimulations, I (i) want to estimate parameters of an empirical distribution and (ii) draw a random sample based on the estimations. My random variable $Y$ seems to follow a Generalized Beta ...
3
votes
0answers
23 views

Generating column stochastic random matrix with target row sums

I want to populate a 0-1 matrix, which is an adjacency matrix, corresponding to a directed graph, with weights on the elements that are 1. In other words, I want to generate an $N\times N$ matrix $A$ ...
2
votes
0answers
18 views

Simulating Case-Control-Covariate Data

I generate data with a covariate $Y_1$ and disease liability $Y_2$ using the following model: $\begin{pmatrix}Y_1\\Y_2\end{pmatrix} \sim \mathcal{N}\left( ...
2
votes
1answer
103 views

simulating data with a lot of predefined constraints in R

how to simulate data (in R) to generate , sample values 1) variables with specific correlation values for a particular model AND 2) with predefined regression coefficients? 3) Can we also set the ...
0
votes
0answers
176 views

A practical question in simulating real world outcomes

PredictWise aggregated polling data and, for each state, estimated the probability that the Obama or Romney would win. Here is the polling data. The data frame has 51 rows(51 states). the name of this ...
1
vote
0answers
25 views

On sampling from all the continuous functions in [0,1]

I was watching this youtube video for motivation on measure theory and at the 7:20 mark a reason for utilizing measure theory is given; to be able to pick a random function from all the continuous ...
2
votes
2answers
292 views

Why doesn't my Wiener process simulation work?

The Wiener process at time $t=0$ is $0$. It has independent increments, so $W_t-W_0 \sim N(0,t-0)$, but wouldn't it mean that $W_t\sim N(0,t)$ for every $t$? But if I try to simulate a a ...
2
votes
1answer
24 views

Adjusting Monte Carlo estimates to generate correct even moments - improving on antitthetic draws

If I want to generate a matrix 10,000 (row) samples of 3 uniform (uncorrelated) variables it is trivial to use antithetic draws to ensure the odd moments such as the mean equal their "true" value. ...
1
vote
0answers
14 views

Are Lyapovov exponents related to statistical precision?

In my understanding, Lyapunov exponents measure the average rate of separation of near-identical chaotic trajectories, while statistical precision, in the context of a predictive model, is a measure ...
0
votes
0answers
9 views

Simulating an ODE model with non-constant parameter

I have a model, I can formulate the model using ordinary differential equation with parameter $P$. I want to simulate the model, but instead of using a fixed constant $P$ for the parameter, I want to ...
0
votes
0answers
43 views

Simulate Autoregressive Conditional Poisson data

Currently, I am doing the simulation with Autoregressive conditional Poisson (ACP). To test whether my parameter estimator is better than MLE (by comparing the biasness), first, I have to generate ACP ...
2
votes
0answers
46 views

Uncorrelating correlated $\chi^2$ distribution

This question is related to my previous question in here So I was trying to simulate correlated $\chi^2(1)$ random variables given the desired co-variance matrix. However, it seems like the only ...
1
vote
0answers
39 views

Confidence intervals for sample mean when estimated standard deviation is 0

I ran a Monte Carlo simulation to determine a confidence interval for the population mean based on N trials. The underlying distribution of results is not normal (the values are discrete -- 0, .5 or ...
0
votes
0answers
18 views

How to do Hierarchical (Nested) Elliptical Copula simulation sampling

dear researchers, I am doing a project to aggregate about 30 risks into total loss (15 of them are market risks, and 15 of them are insurance risks). The current approach is to simulate millions of ...
1
vote
1answer
78 views

What inputs, ideas or insight the community can offer on the subject “A simulation study of sample size for multilevel logistic regression.” [closed]

I have been assigned a topic on "A simulation study of sample size for multilevel logistic regression." I have searched the topic but found little reference on it. Could you please offer some ...
2
votes
0answers
31 views

Antithetic Variables Approach

Given the function $\sqrt{x}/\sqrt{x+1}\exp(x^2)$, I am trying to approximate the integral over $[1,5]$ using the antithetic variables approach with five intervals. First, from my understanding of ...
0
votes
0answers
28 views

Effect of Sample Size on Model Mean Squared Error

I am studying Linear Regression by performing a simulation study with different sample sizes. As I increase the sample size the mean squared error seems to reduce but with a very large sample size ...
25
votes
6answers
2k views

When to use simulations?

So this is a very simple and stupid question. However, when I was in school, I paid very little attention to the whole concept of simulations in class and that's left me a little terrified of that ...
0
votes
0answers
17 views

Interpreting and simulating reciprocal relationships in path analysis

I'm trying to model how the process of habitat clearance affects the number of species in a landscape, using path analysis. I have the following variables: ...
3
votes
0answers
63 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 ...
1
vote
0answers
30 views

Intraclass correlation and simulating data

I will apologize in advance for this somewhat messy problem. I am trying to take an ICC reported from a previously published manuscript and design a general simulation program. Let's say the ...
1
vote
1answer
45 views

simulating a multiple comparisons problem using R and bonferroni correction

I am actually working on an exercise for my students dealing with multiple comparisons. However, I was having trouble trying to simulate some data in R to demonstrate the problem with multiple ...
0
votes
0answers
36 views

Deforestation Scenarios using Logistic Regression (Stata)

I used Logistic Regression to model the contribution of a range of explanatory variables on deforestation processes (being my dependant variable - Deforested=1, No Deforestation=0) in the Brazilian ...
1
vote
0answers
60 views

How to present multiple distributions with R?

I have a stochastic simulation on NetLogo in which my agents accumulate "wealth". Of course, every run gives me different outputs but with pretty much the same distribution. I use histograms to keep ...
1
vote
1answer
28 views

Difference between recentred and scaled eigenvalues and the Tracy Widom distribution

I have been generating correlation matrices from independent normal data simulated using the MASS package. I do this k times and extract the eigenvalues of the matrices. I was interested in comparing ...
5
votes
2answers
162 views

How to simulate effectiveness of treatment in R?

Let's say I want to write a simulation for the table below to decide if Xylitol treatment and ear infections are independent. How would I go about doing this?
0
votes
0answers
57 views

MonteCarlo simulations to test light curve variability

I have an average orbital light curve for a source, that is, binned count rate vs orbital phase, where the count rate are averaged over a number of orbit. I want to run MonteCarlo simulations to find ...
1
vote
0answers
27 views

A simple approach to maximum likelihood estimation for a model with no closed-form solution

I would like to estimate the best fitting parameters of a parametric model, $f(\theta)$, that does not have a closed-form solution. There are $n$ i.i.d. environmental observations and the aim is to ...