Skip to main content

Questions tagged [simulation]

A vast area which includes generating results from computer models.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

Probability that >= m successes occur in n Binomial trials

Suppose that I intend to submit a survey to customers and want to ensure that there are at least m responses with y% confidence given response rate x% and n customer engagements. My intuition is that ...
jbuddy_13's user avatar
  • 3,394
1 vote
0 answers
8 views

Adjusting VAR-coefficients for simulation

I am estimating a VAR-model, which I then use for Monte Carlo simulations. However, for some of the variables there is a clear downward trend in the data which we don't want to include in our ...
kraagje's user avatar
  • 105
0 votes
0 answers
26 views

How to run a sensitivity power analysis for linear mixed modeling (lme4 and simr)?

We conducted a behavior change field experiment using the following variables: Two time points (T0, T1) Two groups (intervention vs. control) Individual ID (n = 62 in group 1, n = 53 in group 2) ...
AnnaBosshard's user avatar
5 votes
2 answers
324 views

How to simulate interaction between categorical and continuous variables over a binary outcome?

For a power analysis, I need to simulate data to run a glmer model with an interaction between categorical (three levels) and continuous (which is going to be the moderator; high-score participants vs....
Olivia's user avatar
  • 321
0 votes
0 answers
14 views

Simulate Gaussian copula with negative pair-wise correlations

I am now trying to simulate a multidimensional (let's say 4 dimensions) Gaussian copula. Given software restrictions, I can only use Excel for this simulation. That is why I am trying to implement the ...
S. Z.'s user avatar
  • 1
2 votes
1 answer
45 views

Steps for Forecasting with known copula's parameters

I want to calculate the Mean absolute percentage error (MAPE) for my copula model. I am stuck at the forecasting step. I am not specifying the copula here for different data pairs. I have two time ...
nadeem's user avatar
  • 23
0 votes
0 answers
6 views

Is "relative risk time" meaningful? (transient relative risk)

Context: I'm trying to specify a data-generating / mechanistic model for a simulation study. I assume that exposure $e$ (a short event) has a transient effect on the relative rate of another process $...
jessexknight's user avatar
0 votes
0 answers
32 views

Simulate $p$-value of $\chi^2$-test

The R function chisq.test has an simulate.p.value argument that uses permutation for resampling. I know how to implement this ...
Syd Amerikaner's user avatar
3 votes
1 answer
39 views

Can I use simulated data only for testing a Random Forest regression already trained on real data?

I am working, using Python, on a Random Forest Regression for the prediction of a target variable. I have trained it and tested it on real data, obtaining satisfying results. Now, I would like to ...
Ismaela Avellino's user avatar
0 votes
0 answers
26 views

Difference in means and variances of dependent samples

I am performing a simulation study where different values of an exposure X are repeatedly assigned to the same individual (200x in a sample of >10000 people). The way that assignment is done is ...
JuM24's user avatar
  • 21
1 vote
0 answers
12 views

Recycling MCMC samples for another data set from the same distribution

Suppose I'm given $\theta_0$ and I want to sample data from a density $f(Y|\theta_0)$ and then sample from the posterior of $\theta|Y$ (given, obviously, some prior). I want to do this lots of times, ...
Thomas Lumley's user avatar
1 vote
0 answers
26 views

How to simulate this AR(1): Xt =2+0.8(Xt_1 −2)+εt series in R? [duplicate]

I want to simulate an AR(1) model defined as follows: $$X_t = 2 + 0.8(X_{t-1} −2) + \varepsilon t$$ but I do not know how to interpret the constant $2$ in this term. How do I simulate this in R?
Maurice Pape's user avatar
0 votes
0 answers
18 views

Is this a reasonable way to check the quality of simulated data in MCMC inference?

I have a hierarchical Bayesian model that looks like this: $\alpha_i \sim \mathcal{N}\left(\mu_\alpha, \sigma_\alpha\right) \tag{1}$ $\beta_i \sim \mathcal{N}\left(\mu_\beta, \sigma_\beta\right) \tag{...
chesslad's user avatar
  • 211
2 votes
1 answer
148 views

Expected Value Chi Square distribution

I'm trying to simulate the distribution from the sample variance $s^2$ and compare it with the theoretical distribution. Therefore, I perform a fairly simple simulation (upfront, I'm not a ...
Mexx's user avatar
  • 33
1 vote
0 answers
57 views

Least-bad stepwise procedure for a simulation that shows issues with stepwise regression

I am well-aware of the issues that stepwise regression causes. I want to demonstrate some of them via simulation in a particular situation. I am thinking of a regression where I have some categorical ...
Dave's user avatar
  • 65.1k
5 votes
2 answers
80 views

How to deal with competition for variance between a fixed and random effect?

I am performing an analysis on data in which there is a hypothesized relationship between X (predictor) and Y (the response) across a broad area, but random (no relationship) within groups of ...
Darren G's user avatar
2 votes
1 answer
60 views

Power calculation with a binary outcome (using a R package & manual simulation)

I am trying to compare three different methods for power calculation under the same setting. Although I understand that the power estimates from each method cannot be exactly identical due to ...
KLee's user avatar
  • 335
9 votes
2 answers
235 views

How to Simulate Data for a SEM Model with Moderation Effect Using R?

I'm working on a project where I need to simulate data for a Structural Equation Model (SEM) that includes a moderation effect. Specifically, I have three latent variables: an independent variable (IV)...
Iman's user avatar
  • 201
2 votes
1 answer
41 views

How to simulate a time-series based on other time-series that have different seasonality (and other effects)?

I have a list of solar production data time-series for a set of houses in a given area, and I need to simulate the solar production vs time curve of a new house in the area. The sum of the total ...
Falcon X's user avatar
0 votes
0 answers
27 views

Sample size for a vector of proportions and simulation

Currently, there are more than 10 variants of omicron virus. Say, variant proportions are X1=0.1, X2=0.35, X3=0.15, etc. I need to calculate the number of samples needed to detect the proportion of ...
ariadnaoliver's user avatar
0 votes
0 answers
37 views

How to guess a random walk to achieve max sample correlation?

Define this 1-D discrete random walk start from 0: roll a die (the die may or may not be fair, the fixed probability of each face is unknown to the observer/guessor)...
cat's user avatar
  • 53
2 votes
2 answers
47 views

Data modelling as a surface

I want to model waste generation in a city using data from the containers. I have the location and fill levels of each container over time. My idea is to use the average amount of waste in each ...
pato's user avatar
  • 21
0 votes
1 answer
46 views

Are the p-values obtained on the same sample using synthetic AA tests (Monte Carlo) independent values?

Let's say we have the following procedure. We take a fixed sample of size n and perform the procedure 1000 time: we divide (split) it equally into 2 groups; we calculate p value using the F function (...
Романов Андрей's user avatar
3 votes
2 answers
81 views

Didactic example of mean-variance dependency in linear models

I'd like to illustrate the importance of accounting for the dependency between mean and variance in inference with linear models. Is my example below a good one? Do you agree with my comments on it? ...
dariober's user avatar
  • 4,764
1 vote
0 answers
73 views

Simulation of Random Processes to Check Stationarity

I am wondering if this is a valid approach: I want to validate that certain random processes are not weakly stationary (constant mean, covariance depends on the lag, finite variance) through ...
da7666's user avatar
  • 101
2 votes
4 answers
469 views

I want to show by simulation that the Wilcoxon test is more robust than the Student test for non-normally distributed data

I want to test by simulation that the Wilcoxon test is more robust than the Student test for non-normally distributed data. For example, I'm testing the ...
Seydou GORO's user avatar
1 vote
2 answers
65 views

Mixed model: Which parameters to provide for sample size calculations?

I am currently planning an analysis in a relatively new area of research and would like to provide data that will allow for future power analyses. Unfortunately, I am completely lost in the ...
a.henrietty's user avatar
0 votes
0 answers
19 views

What is the standard deviation/uncertainty of a single observation in a meta-analysis?

I am running a simulation with parameters based on an existing random-effects meta-analysis. I would like to draw individual patients in the treatment group from a normal distribution with µ=the ...
bumble.bee's user avatar
0 votes
0 answers
15 views

When can I use bootstrapping in a microsimulation model?

I'm investigating uncertainty in a linked series of microsimulation models, the outputs of each feeding into the next. The first model (model A) generates individuals by resampling them - using a ...
nwrdobrn's user avatar
0 votes
0 answers
36 views

Calculating Sample Size for Cumulative Link Mixed Model (CLMM)

I am going to collect data in which each participant answers to 3 questions to 18 vignettes (each vignette has 3 questions), each question with likert scales 1-5. The dependent variables (questions) ...
Simón Schulz Montecinos's user avatar
0 votes
0 answers
41 views

Beta-binomial relationship between dispersion and correlation parameters

Context: I have created a beta-binomial model using glmmTMB() from the glmmTMB package and I am now trying to simulate a beta-...
Reid's user avatar
  • 13
3 votes
1 answer
47 views

How to simulate non-standardized artificial data for logistic regression?

I would like to simulate data for a logistic regression with the predictor variables on their original scale. There are, of course, a litany of similar previous questions (e.g., here, here, and here). ...
the-mad-statter's user avatar
0 votes
0 answers
23 views

How can I simulate the path between two defined points but also define the overall step variance?

As stated in the question. I’m wondering if it’s possible to simulate a random walk between two fixed points (always start at A and finish at B) where the variance of the difference of steps is also ...
IGK's user avatar
  • 1
1 vote
1 answer
24 views

Forecasting positive time series with missing values and few observations

I am working on forecasting a positive time series dataset of prices with missing values and only a limited number of observations. Specifically, I have 150 observations, one per week, and I need to ...
anasse's user avatar
  • 11
5 votes
1 answer
42 views

ABC (Approximate Bayesian Computation) Sampling, Simulating data from Complex models

In ABC sampling methods, Rejection, MCMC and SMC, when we sample potential parameter values from the prior/proposal, we then use those parameters on our model and simulate data values. This can be ...
AlexS123's user avatar
1 vote
0 answers
30 views

Extended Hidden Markov Models (HMM) parameter estimation

For simpler HMMs, we can use algorithms like Viterbi training (not decoding) or Baum Welch to estimate the parameters that best describe the observed data. How do we do the same when using a more ...
AlexS123's user avatar
0 votes
0 answers
11 views

Help in simulation for bivariate residual entropy

I am reading a research paper research paper. Let $X=(X_1,X_2)$ be a bivariate random vector with survival function $\bar{F}(x_1,x_2)$. The the condition residual entropy for the condition ...
Unknown's user avatar
  • 173
0 votes
0 answers
21 views

How to evaluate an Earth system model in light of the spatial variability of observed variables?

Context My effort is to evaluate the performance of a physics-based numerical model to determine how well it simulates different state variables of a soil column (1D inside the model). The temporal ...
Alireza Amani's user avatar
1 vote
0 answers
43 views

How to compute relative error of multi-dimensional time-series?

I have written a python script that uses a variety of different integrators to simulate the gravitational N-body problem. I would like to compare the positions obtained from my simulation to the ...
user23358153's user avatar
0 votes
0 answers
6 views

How to Calculate Number of Repeated Tests to Achieve a Target ICC?

I am designing a case study and will be measuring something at baseline, periodically over time, and at post-testing. I will use the baseline measures to be able to calculate the 'minimum detectable ...
Jake Remmert's user avatar
0 votes
0 answers
34 views

Simulate bivariate bernoulli responses with predefined beta coefficients

I have a specific data matrix with features (mainly categorical). I want to simulate a multivariate bernoulli response, for example bivariate, but with a predefined vector of beta coefficients (most ...
eddie8434's user avatar
1 vote
0 answers
70 views

Should I use a one-sided or a two-sided confidence interval?

Context: I am teaching a subject and I prepared a multiple-choice quiz for my students. To have a feeling for which is an acceptable grade I decided to compute a baseline score, which is the score ...
rusiano's user avatar
  • 566
0 votes
0 answers
38 views

How can I determine if a system is equilibrated?

Cross-posted in SCSE and MMSE I am experimenting with a new MCMC protocol and new research. In the context of Monte Carlo simulation, a "state of equilibrium" refers to a condition where the ...
user366312's user avatar
  • 2,201
0 votes
0 answers
20 views

Stationary Bootstrap Block Size Impact on Portfolio Simulation Results

I'm analyzing simulated portfolios generated using the stationary bootstrap method proposed by Politis et al. (1994). This method is expected to be robust to the choice of average block size, as it ...
pinpss's user avatar
  • 1
0 votes
0 answers
76 views

Post hoc power for multiple logistic regression

I have data frame named "finalend", I conducted multiple logistic regression model named "model" with all predictors as categorical or binomial variables and "TestAnxiety"...
NEA's user avatar
  • 33
0 votes
0 answers
12 views

Assigning variance-covariance matrix in generating artificial data for mixed-effect model

I can’t understand specifying correlation between within-participant conditions when generating artificial data for mixed-effect model regression. It would be grateful if you could help me. My story ...
AKIRA28's user avatar
  • 45
0 votes
0 answers
40 views

When do we not know the distribution of residuals?

In a previous question (How does simulation help validate model assumptions?), I received the following comment: "When a model is too complex such that a derivation of the distribution of the ...
Uk rain troll's user avatar
4 votes
1 answer
38 views

How to estimate required sample size for the two-sample Kolmogorov-Smirnov test

I have a simulation model which produces a value for an output variable. Running it many times gives skewed distributions for this output variable. What I'd like to do is compare two distributions, ...
Riley's user avatar
  • 151
0 votes
0 answers
25 views

Specifying random effects for simulation of categorical data

I am simulating data for an experimental design with two conditions. I specified the following multilevel model: $$ y_{ijk} = \beta_0 + u_{0j} + v_{0k} + (\beta_1 + u_{1j} + v_{1k}) * X_1 + e_{ijk} $$ ...
aaron's user avatar
  • 1
3 votes
1 answer
71 views

How to show in R, using a simulation, that when sampling from a normal distribution, the sample mean and sample variance are independent

What is the best way to show that when sampling from a normal distribution, the sample mean and sample variance are independent? I know the theory behind this result, I would like to show it using a ...
Carlos233's user avatar

1
2 3 4 5
39