Questions tagged [simulation]
A vast area which includes generating results from computer models.
1,985 questions
2
votes
2
answers
105
views
How to simulate paired data? Or what characterizes paired data?
I am interested in running some simulations on how well some non-parametric tests can work on paired data. But I am not exactly sure how to simulate such paired data.
An obvious (?) approach would be ...
1
vote
0
answers
51
views
Buffon's needle approximation does not converge to Pi [closed]
Hello everyone,
Maybe you have heard of the famous Buffon's Needle (Wiki) which can be used to approximate Pi be throwing random needles to a sheet of equidistant lines. Mindblowing observation. ❤️
I ...
0
votes
0
answers
36
views
True slope parameter for quantile regression with heterogeneous error
I am trying to perform a Monte-Carlo simulation on quantile regression using R. Currently I am getting stuck simulating the data from the model below.
...
7
votes
1
answer
264
views
Why does my fixed effect model perform better than my random effect model?
I've written a small simulation below to try and understand the differences in performance between fixed and random effects in a model.
I am imagining a bunch of eggs incubated together in a clutch (i....
2
votes
1
answer
190
views
ICC of predictors too high in multilevel data generating process
I am currently working on a data-generating function in R that creates multilevel data, where I want to control the intraclass correlation coefficients (ICCs) for both the outcome and predictors. ...
0
votes
0
answers
29
views
Distingusihing between correlation and dispersion
I came across this chart for UK Internal Medicine Training recruitment which raises a couple of issues.
The first issue is that there is a visually obvious pattern that even numbers are more likely ...
2
votes
0
answers
68
views
How can I best evaluate whether uncertainties (confidence/credible) are of appropriately width, in simulations?
I would like to evaluate how well two experimental designs perform with the goal of parameter estimation. I'm generating 1000 simulated datasets for each design and fitting the same model to all of ...
1
vote
0
answers
52
views
How to simulate the ATE?
I want to have a rather basic simulation for a treatment effect. The treatment is binary, the outcome is continuous. In Stata, one could simulate data as follows (I think users using different ...
5
votes
1
answer
88
views
Including finite population to power analysis
I’m estimating how many patients need to be surveyed annually to detect a 10% change in over a 10-year monitoring period.
My response variable is binary (1 = yes, 0 = no).
I’ve set the significance ...
2
votes
1
answer
60
views
How to Verify Reported SE or SD When Derived Correlation Is Invalid?
My current question is related to a previous post I made on the same topic. I am conducting a meta-analysis and have encountered several publications where, when I attempt to estimate the pre-post ...
1
vote
0
answers
52
views
Simulating Longitudinal Clinical Trial Data in R [closed]
I want to simulate some longitudinal clinical trial data in R. Two arms, 1051 patients per arm.
I will want to vary the number and timing of visits e.g. Baseline plus 2 visits might look like this 0,0....
0
votes
2
answers
142
views
Appropriate use of bootstrap?
Consider this model as the true data generating process of the population (simple example used for simplicity):
$$y_i = 2 + 3X_i + \epsilon_i$$
$$\epsilon_i \sim \mathcal{N}(0, 1)$$
I have a very ...
3
votes
0
answers
111
views
How to perform a simulation-based power analysis for data with beta distributed DV?
I have to perform a power analysis to compute how many participants I need to recruit for an experiment. My problem is that I am not sure if I wrote the script in a right way. I have never tried to ...
1
vote
0
answers
59
views
Is finding a fraction similar to a CDF sufficient evidence to propose a probability distribution?
I am modeling protein-ligand binding, where the fractional saturation is described by the Hill-Langmuir equation:
$y(L)=\dfrac{L^h}{K^h+L^h}$
I've noticed this function has the same mathematical form ...
2
votes
1
answer
150
views
poor parameter recovery in brms from simulated vigniette experiment
I design a vigniette experiment about social norms: There is a social-media post about reducing meat consumption which varies the actor (stranger, friend, relatie), the amount of the reduction (no ...