# Questions tagged [simulation]

A vast area which includes generating results from computer models.

1,414 questions
Filter by
Sorted by
Tagged with
20 views

### Question regarding calculation probabilities [closed]

This question is mainly an application of probabilities in real life. In horse racing ,there is a ratio that what we call Stakes Winners to Runners ratios. This is calculated by dividing the total ...
58 views

### What are the steps to simulate data for a linear model with random slopes and random intercepts

I have searched this site for existing answers but so far I didn't find anything. I did see this one How to simulate a random slope model Unfortunately it doesn't answer my question. I would like to ...
9 views

### Turning a for loop to simulate data into a parLapply that runs on parallel processors [closed]

I currently have a for loop that generates survival data and fits it to three separate joint models. To make this example more reproducible/easier to help, I've changed the joint models to linear ...
15 views

### What are the rules to follow for statiscal/econometic modelling on simulated data (OLS, …)? [closed]

I have to create a simple model from 2000 simulated observations that constitute my database. What should I've to consider for my analysis regarding the nature of my data please ? Furthermore, can I ...
33 views

### How to simulate two correlated time series

My question is similar to How to simulate two correlated AR(1) time series? but more complex as I want to simulate time series with various AR and MA parts. I have one time series with the historic ...
16 views

### Simulation and Power of Factor Interactions

Suppose I am simulating power using the following DGP, consisting of two three-level factor variables and their interaction (for extra clarity, $x_l$ and $z_l$ are binary indicators for each factor ...
39 views

### Simulating realizations of joint Bernoulli distribution

Let $X$ and $Y$ be Bernoulli random variables with success probability $p$ and $q$ respectively, i.e., \begin{align*} X = \begin{cases} 1 & \text{with probability $p$} \\ 0 & \text{with ...
28 views

20 views

### SARIMA: simulation within limits

I am trying to generate hypothetical data through the SARIMA random process. I implement this via statsmodels.tsa.statespace.sarimax.SARIMAX.simulate where I manually define the coefficients. Here is ...
89 views

### Simulating observations for a 2-way ANOVA (in R) w/ mixed effects model and recovering true variance parameters [Gage R&R]

I would like to create a simulation of a Gage R&R experiment in R. A Gage R&R is an experiment designed to analyze the variance contribution of several factors relative to the overall variance....
21 views

### Constrains on the coefficients of SARIMA

I am trying to generate synthetic time-series through SARIMA random process by defining the model coefficients manually. Could any one help me how to generate coefficients? What are the constraints on ...
150 views

### Holding other predictors constant via simulation in R

Imagine predicting salary of some professors from their years of experience (time) controlling for/holding constant their number ...
17 views

### Comparing simulated parameters to their theoretical values

I created three variables in r using this code ...
51 views

### How to compare correlation coeffecients across studies (meta-analysis, simulation-analysis)?

I have one metric dependent variable (grain yield) and three metric traits, A, B and C. Grain yield and all three traits were measured in several studies and each time a Pearson correlation between ...
28 views

### Cross comparison analysis of simulation models

For my thesis, I created a simulation model which simulates the barge shipping process (basically travelling to the port and do a route where terminals are visited so that barges will be handled). I ...
33 views

### What would be the probability distribution to simulate K events randomly assigned to N individuals?

I am trying to randomly simulate a population of $N$ individuals among which a predefined number $K$ of them have an outcome. The trick is that I want to assign different probabilities to the ...
4 views

### How to find the best or optimal parameter value set for agent based or other kind of modeling?

I am doing agent based modeling (ABM) for infectious disease modeling, and the model has 50+ parameters which can any probability value between 0 and 1, or can be any float value from 0 to >0 (...
24 views

### Clustering common words for objects

I am currently running experiments aiming to simulate information transfer between agents. Without going into too much irrelevant detail, following the conclusion of a simulation I am left with a csv ...
59 views

### sampling from $\frac{1}{1+x}$ times Gamma distribution density

I am simulating a process by drawing many random variates $X$ from a Gamma distribution with parameters $\alpha$, $\beta$, f_X(x) = \frac{\beta^\alpha \, x^{\alpha-1} \, e^{-\beta x}}{\Gamma(\alpha)}...
61 views

### Generating uniform points inside an $m$-dimensional ball

The present question follows on from some other questions on this site asking how to generate uniform points on a disc (see e.g., here, here and here). The natural extension of that problem is to ...
21 views

### Simulation study - what error variances to use from empirical data? MS error of an ANOVA or the variance of their residuals?

I want to do a simulation study in R and I have already some empirical data, that gives me a hint about the variance parameters to set. But what should I use for the error variance? Here's an example ...
975 views

### Generating random points uniformly on a disk [duplicate]

I have to randomly generate 1000 points over a unit disk such that are uniformly distributed on this disk. Now, for that, I select a radius $r$ and angular orientation $\alpha$ such that the radius $r$...
116 views

27 views

### Simulate a variable based on a known correlation and distribution

I have a normally distributed variable (var2) with a mean of 10 and sd of 3: mean <- 10 sd <- 3 var2 <- rnorm(n = 1000, mean = mean, sd = sd) I want ...