A vast area which includes generating results from computer models.

learn more… | top users | synonyms

1
vote
1answer
20 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
28 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
47 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
29 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
45 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
17 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
59 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
56 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
44 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
19 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
17 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
99 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
24 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
286 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
23 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
37 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
35 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
17 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
24 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
15 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
61 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
25 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
37 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
33 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
27 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
158 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
55 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 ...
5
votes
2answers
277 views

How to simulate a system where “the failure probability per week is 3.5%”?

I have system described by a statement like "The failure probability per week at 20 Celsius degree is 3.5%", how can I simulate such a system? The simulation I have in mind should answer to questions ...
0
votes
1answer
47 views

Generating random simulations of events [closed]

Whole-edited to make it more simple. Let's assume we have a concrete event: A baseball player's batting average is 0.32. I want to find a random number X, that ...
3
votes
1answer
176 views

Why is the difference between these two t-tests so big?

I am using a t-test to find out whether the mean of a sample ($1.05$) with a sample size of $100$ is significantly different from a given mean ($1.2$). The standard deviation should be $0.5$: ...
1
vote
1answer
30 views

Simulating r.v.'s $X, Y, X \in [0,1]: X+Y+Z = 1\;a.s.$ given we know $E[X],E[Y],E[Z]$ and $E[X]+E[Y]+E[Z]=1$ with marginal variances $\sigma^2$

I think my title says most of my question, but let me re-state: I am trying to simulate variable percentages (i.e., X,Y,Z) on the above simplex without using the Dirichlet distribution. The reason ...
1
vote
0answers
30 views

Distribution of “priority” emails among agents with different speeds (strange question)

but I figure if someone knows how to answer it, it may be someone here. Basically I have this weird distribution where the customer service agent speed (in terms of contacts per hour) is very ...
5
votes
2answers
216 views

A potential confound in an experiment design

Overview of the question Warning: This question requires a lot of set-up. Please bear with me. A colleague of mine and I are working on an experiment design. The design must work around a large ...
1
vote
1answer
43 views

Simulating Negative Binomial Arrivals

I am building a simulation. I want to generate arrivals according to a negative binomial process. The data will show the minute of each "customer" arrival and look something like the following: ...
0
votes
0answers
18 views

Conjoint simulation output

I am doing a traditional conjoint study with 3 attributes (brand,price and applicator) each with three levels. I asked respondents to rate the profiles from 1 to 9. Now I run 2 simulations with 9 ...
0
votes
0answers
17 views

ABC-based inference for a dynamic model of multiple time stages

I am working on a dynamic model of multiple time stages (e.g. 0-15h, 15-30h, 30-45h); the model has three time stages in total. Each stage has associated with it 4-8 different parameters and I am ...
1
vote
2answers
37 views

Relative Error Temperature

I have a model to simulate temperatures and I want to compare it to reference values. I thought that the relative error (or rather percentage error) would be interesting, but I'm rather confused on ...
1
vote
0answers
109 views

Generate correlated continuous and categorical data in R

Task at hand: generate a simulated dataset containing both continuous and categorical variables, given a pre-defined correlation matrix. What has been done: this post covers how to generate ...