Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Make your voice heard. Take the 2019 Developer Survey now

Questions tagged [simulation]

A vast area which includes generating results from computer models.

1
vote
1answer
28 views

First passage time distribution via Monte Carlo simulation

The problem: I want to assess the first passage time distribution via Monte Carlo Simulation, where the first passage time is defined as: $$\tau=inf\{t: X_t > l\}$$ where $l$ is the barrier ...
2
votes
0answers
23 views

Error of Bias-Corrected Kurtosis Estimators

Background I've found two different bias-corrected estimators for the kurtosis. The first one is used in various software packages, such as MATLAB, and is called bias-corrected in the respective ...
0
votes
0answers
10 views

How to calculate the mean of a sub sample, given the mean of the super sample and the standard deviation of the population?

I need to run a simulation of cash flows for a project. We are selling a service. The service comes with a range of options. Depending on the specific options chosen, the cost of the service can ...
0
votes
0answers
19 views

Experimental design for simulation experiment

I'm interested in investigating the effect of a treatment on survival times of a patient. The "patient" is a complex program with many interacting categorical and continuous variables. It also has a ...
0
votes
1answer
27 views

How can I make simulated logistic regression model more noisy?

When I want to simulate Y coming from the linear regression model, $$Y_i = X_i ^T \beta + \epsilon_i,$$ I can use code like: ...
0
votes
0answers
10 views

Combining Results of Simulation Replications (Random-Intercept Logit Models under Confounding)

I've written some simulation code in R to learn about the behavior of a random-intercepts logit model under varying degrees of confounding. The simulated scenario is three points in time, two groups, ...
0
votes
1answer
17 views

G*Power and simulation produce very different sample size estimates for a Poisson regression

I've been attempting to conduct a sample size calculation for a Poisson regression. G*Power produced a sample size of 472. Parameters for G*Power Tails = 2 Exp(B1) = 1.233 alpha = 0.05 Power = 0....
1
vote
0answers
26 views

Simulating survival meta-analysis data (with a random effect) [closed]

I would like to simulate survival meta-analysis in clinical trials on R but I'm not pretty sure of what would be the best way to do it and what would be fitting more the reality. The data would ...
0
votes
2answers
43 views

Bayesian- If I only have prior distribution, is there a way to calculate posterior distribution? [closed]

I have a question about Bayesian inference. In my research, I have only a normal prior distribution with known parameters (mean and std.). I do not have a likelihood function, but I need to calculate ...
0
votes
0answers
60 views

Simulating noise around future known data points

I am creating a simulation model of an electricity market. One of the important characteristics is fuel price. Whilst I would like to set the future fuel price, I would like to sample from a ...
-1
votes
0answers
7 views

How to detect cross-loadings in a factor analysis

This is a follow-up question to my previous question on PCA (and also on factor analysis). The main question is why a factor analysis sometimes fails to retrieve the data generating model and how to ...
1
vote
1answer
29 views

Bayes inference: hypothesis testing on the average parameter

Bayesian inference field: given a dataset, if I assume a normal a priori distribution on the average parameter with zero mean and a given variance, those hypothesis tests can be carried out on the ...
0
votes
2answers
50 views

PCA to recover factors used during data generation. Why doesn't it work?

I often found that the results of a PCA or any kind of factor analysis are interpreted in a "causal" fashion. I.e. if a principal component with high variance explanation is found, this is interpreted,...
0
votes
0answers
15 views

Python: Simulate data correlated with a given array

Although there are some existing methods (e.g. np.random.multivariate_normal) for simulating random correlated variables for given mean, corr and assumed distribution, I couldn't find a way to ...
3
votes
2answers
111 views

Simulating the Posterior Density of a Transformed Parameters

I am reviewing an example (p. 180-181, Example 11.3 and 11.4) from All of Statistics by Larry Wasserman. The example intends to illustrate that the posterior can be found analytically and can be ...
1
vote
1answer
20 views

What prior distribution of parameters in the Bayesian estimation of a GARCH model?

In the case of the Bayesian estimation of GARCH(1, 1) model with Student–t or a Skewed distributions for innovations, is it more correct to assume a uniform distribution for the parameters or to ...
1
vote
1answer
43 views

Using a simulation to show sceptics that t-test gives the right answer, and how to do the same for a bayesian inference case

I want to demonstrate to sceptical colleagues and friends that statistical analysis works. And there’s a follow-on question regarding doing the same with bayesian inference. Suppose that I want to ...
0
votes
0answers
11 views

Method to objectively optimize several parameters to find best fit between 2 curves

I'm not sure if the title describes correctly what I'm asking, it's hard to put into few words what I need, and my knowledge in statistics is very basic. I have an observed curve of, let's say, the ...
1
vote
1answer
31 views

Generate Variables from Causal Structure for Simulation with Binary/Indicators

I would like to generate a data set of variables from a specific causal structural (a stylized world) for simulation, similar to this answer, but most of the key variables are binary/indicators. ...
0
votes
0answers
31 views

Does standard error affected by the coefficient?

I make a comparison on ridge regression and OLS using simulation. As i set my correlation as 0.9, which is high, i expect the standard error of ridge regression to be low. However, it is not. ...
1
vote
0answers
12 views

Simulating size distrotion with a VAR(1) model

Firstly, I am not asking for code, I would like the intution of how I would do this. I am testing for size distortion. I have estimated and VAR(1) model and I have the parameters. I want to ...
2
votes
0answers
28 views

Simulation - problem of maximization inside a circle

I am doing some projects related to statistics simulation using R based on "Introduction to Scientific Programming and Simulation Using R". In the Students projects session (chapter 24), I am doing ...
0
votes
0answers
11 views

Dickey fuller to estimating other biases, intution needed

I have recently been working on replicating the Dickey-Fuller critical values i.e. generating the Dickey-Fuller test distribution. However, I would appreciate some intuition on this and some advice ...
0
votes
0answers
12 views

simulation in R: reading arrival times and service times from a set and have priority queue

I want to simulate an outpatient clinic that does not have walk-in. based on a scheduling model, I have already calculated arrival times and examination times and whether the patient will be a show or ...
17
votes
3answers
720 views

How to simulate data to be statistically significant?

I am in 10th grade and I am looking to simulate data for a machine learning science fair project. The final model will be used on patient data and will predict the correlation between certain times of ...
0
votes
0answers
6 views

Model of makeparma simulation

I'm simulation periodic ARMA time series using makeparma function of perARMA R package (https://cran.r-project.org/web/packages/perARMA/perARMA.pdf). But I don't understand which is the mathematical ...
1
vote
0answers
21 views

Generate an autocorrelated Gamma sample of length N

How does one simulate an autocorrelated Gamma sample of length $N$? All I found online was about generation correlated variables and not an autocorrelated sample.
-1
votes
0answers
13 views

Generating Population Correlation Matrix with Model Error per Tucker, Koopman, Linn (1969) and Hong (1991)

I am attempting to recreate the process for generating a realistic correlation matrix for a Monte Carlo study involving factor analyses. I have attempted to follow the steps outlined by Hong (1999), ...
0
votes
0answers
25 views

What causes the degeneration of correlation in a simulated time series?

I am trying to simulate an ARMA(1,1) process with the following characteristics: $\phi$ = 0.97 $\theta$ = 0.80 Standard deviation $s$ = 245 Mean $m$ = 1000 ...
1
vote
0answers
43 views

What does this notation mean? Simulation exercise

Let $F(\textbf{x})$ be the multivariate normal distribution function. A exercise question requires us to simulate from $$dF_\varepsilon(\textbf{x}) = Ce^{\langle\varepsilon, \textbf{x}\rangle} \, dF(\...
1
vote
0answers
31 views

Data perturbation with normal variables

I am doing some projects related to statistics simulation using R based on "Introduction to Scientific Programming and Simulation Using R". In the Students projects session (chapter 24), I am doing ...
0
votes
1answer
39 views

Error in the standard deviation when simulating an ARMA(1,1) using arima.sim

I'm trying to simulate an ARMA(1,1) process whose autoregressive and moving average parameters are, respectively, 0.74 and 0.47. Moreover, I want the simulated data to have mean equal 900 and standard ...
2
votes
2answers
82 views

Bayesian approach to report simulation studies?

I am running a simulation study where we want to estimate a proportion $p$. We are reporting the coverage of credible intervals with a uniform prior, and we are doing $500$ Monte Carlo simulations. We ...
0
votes
1answer
22 views

How to model arrival times in discrete event simulation where arrivals vary with time of day and day of week

I'm looking for suggestions on how to model inter-arrival times in a discrete event simulation where the arrival rate is highly dependent on the day of week and the hour of day. For example: A ...
1
vote
1answer
59 views

Simulation censored data in R

I am trying to simulate a data set of interval censored data(finite interval censored data, right censored data ,and left censored data). In fact, I created two monitoring times in R and I have the ...
2
votes
0answers
29 views

Justification of acceptance probability in simulated annealing

In simulated annealing the acceptance probability for a new state in step $k$ is traditionally defined as $$ P(\text{accept new})= \begin{cases} \exp(-\frac{\Delta}{T_k}), & \text{ if } \Delta \...
2
votes
0answers
24 views

In sports modelling, are hot simulations better or cold simulations?

I'm thinking here largely of the context in which someone has an Elo rating model for a particular sport. To calculate things such as how often the team makes the Finals series, or wins the ...
0
votes
0answers
17 views

Why does correlation changes so much when converting data to pseudo observations for copula fitting?

I'm trying to model the joint distribution of time to failure of 2 (in future possibily more than 2) components. So far what I know is the following: The marginals of these components are ...
1
vote
0answers
17 views

How to visualize binary IVs in logit model simulation?

Hello guys and thank you for letting me join this community, I am working on a logit model and want to display my results with simulation (for clarification I am referring to the style of simulation ...
0
votes
0answers
22 views

Ordinal logistic GEE sample size estimation

I am looking for ways of doing power analysis for ordinal logistic GEE (currently in SPSS, but open to attempting R or something else). My understanding is that this will not be possible in software ...
0
votes
0answers
4 views

Simulate discrete time competing risk data for clustered data

How can we simulate discrete time competing risk data for modelling multilevel discrete time competing risk( multilevel multinomial logit model)
0
votes
0answers
24 views

Reporting mean-squared error using test set

I'm reading an article in which the mean-squared error of the model $$y=X\beta + \varepsilon,~~E(\varepsilon)=0\text{ and }Var(\varepsilon) = \sigma^2$$ is defined as $$ME = E[X\hat{\beta} - X\beta]^...
0
votes
1answer
18 views

Simulating post hoc power for multiple regression

I have a null result for a negative binomial regression model and I would like to give evidence that my sample is large enough to detect even small effects. I've found a few online calculators for ...
1
vote
0answers
48 views

Simulate correlation matrix using a given structure

I want to generate correlation matrix such that it follows the below structure $$\Sigma = B \Lambda B^T $$ where $\Lambda$ is a diagonal matrix containing positive elements, $\Sigma \in R^{n \times n}...
1
vote
0answers
25 views

How to quantify the uncertainty in a single value obtained from a large number of simulations

Im a physics student working on a project in which I have to simulate a machine that would order a bunch of molecules according to their mass. I want to get a quantitative measure of how well the ...
0
votes
1answer
25 views

How to perform a simulation of stock investment, capturing the variance?

I am simulating an individual, who invests throughout his lifetime in stocks and bonds. Bonds have fixed returns $r_f = 11\%$. Stocks are highly volatile and have returns $\mu = 22 \%$ and standard ...
-1
votes
0answers
23 views

Cross tab with missing values

I have a following kind of problem. I have several countries. For every country I know the cumulative value of the variable of interest after four periods. I also know the cross-country sum for every ...
2
votes
0answers
23 views

Adaptive selection of Mass values in Hamiltonian Monte-Carlo?

I know there are good solutions for adaptive selection of path lengths and step-size for Hamiltonian Monte-Carlo (e.g. the NUTS sampler), but for the sampler to work efficiently we also require that ...
2
votes
4answers
197 views

How to simulate Likert-scale data in R? [closed]

I want to do a Monte-Carlo experiment to check my theoretical finding regarding Likert-scale data. I want to have random test results with N participants, where every question has 5 answers: (0,1,2,3 ...
4
votes
1answer
52 views

How are deltas chosen for the proposal distribution in multivariate metropolis hastings sampling?

Say I want to use Metropolis Hastings algorithm to get posterior draws of multivariate parameters. In the one variable case, you could manipulate delta until you found something that worked (gave 40% ...