Questions tagged [simulation]
A vast area which includes generating results from computer models.
1,928
questions
0
votes
0
answers
12
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 ...
2
votes
1
answer
42
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 ...
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 $...
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 ...
3
votes
1
answer
35
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 ...
0
votes
0
answers
25
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 ...
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, ...
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?
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{...
2
votes
1
answer
145
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 ...
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 ...
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 ...
2
votes
1
answer
59
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 ...
9
votes
2
answers
234
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)...
2
votes
1
answer
37
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 ...