Questions tagged [simulation]

A vast area which includes generating results from computer models.

Filter by
Sorted by
Tagged with
-1
votes
1answer
26 views

How can I simulate value from a parametric copula using no parametric margins

I know that if you fit your variables with parametric margins (e.g. beta, gamma) we can easily simulate from copula using the function Mvcd and rMvcd in R.but if you want to work with no parametric ...
0
votes
0answers
7 views

Power analysis for ICC based on averages

I am currently conducting a study with questionnaire data. In the analysis for this paradigm, the questionnaire is presented to different participants with different conditions. Then the data for all ...
1
vote
0answers
32 views

Which statistical model(s) can answer my question?

I have a large dataset (e.g. 1000) concerning nuclear radiation measurements (if I call it Z) where each data point is related to a barrel. These barrels must later on be deposited in a large ...
1
vote
1answer
40 views

How to do Rejection Sampling from a proposal density which is a mixture of two distributions?

Given a density $f(x; \alpha, 1) = x^{\alpha-1}\exp(-x)/\Gamma(\alpha)$ and a proposal density $q(x) = \alpha_1.q_1(x) + \alpha_2.q_2(x)$ I want to generate random samples using Rejection Sampling ...
0
votes
0answers
10 views

R - Is it possible to apply boot function to subselect dataset with very specific mean value? [closed]

I have a data of size 24 000 with mean around 2. It is not normally distributed. I would like to find all the possible combinations with only 15 000 data where the mean is around 1. Is bootstrap an ...
0
votes
0answers
7 views

Is it possible to verify correlation between simulated values?

Given the following steps of time series analysis, is it possible to see if the simulations of Principal Components are uncorrelated? obtain a matrix of fairly correlated variables (~20); apply PCA ...
0
votes
0answers
13 views

How to simulate the supremum of a Gaussian Process

I have a problem where I need to estimate the quantiles of the supremum of a Gaussian Process certain point $t_0$ in time. This should be achieved by simulations. I have a centered Gaussian Process $...
0
votes
0answers
19 views

Distribution of a sequence of maximums generated using i.i.d. Normal variables

I am trying to think about the distribution of a random process. Here's how you would generate the sequence: for each sample of size k (sampled from i.i.d. Normal R.V.s), we find the maximum, and let'...
2
votes
1answer
25 views

Chi square approximation of the likelihood test ratio

I wasn't able to find any satisfying answer about that topic. I hope someone who understand correctly the subject could enlighten this shadow. This is not very important, just for the sake of ...
1
vote
0answers
15 views

Good list of references and books on statistical approximation, simulation and computational methods?

I am looking for books and resources that cover simulation and approximation techniques so that we do not have to follow the strict assumptions held by the many statistical models. With how fast ...
0
votes
0answers
14 views

Parameter estimation for power simulation in R without pilot data

I am planning to do a power simulation in R using the simR package. My hypothesized model is y ~ treat1 + treat2*treat3 + (treat2|id) +(1|item). The parameters for <...
0
votes
1answer
23 views

Multivariate and Marginal simulations

I was wondering if someone could explain the following passage from my textbook. In the third paragraph from the bottom it is stated that the simulated values come from the marginal distributions. ...
0
votes
0answers
6 views

How to compare the similarity of two time-series “loosely” in order to “ignore” temporal shift and scale difference?

I am new to time-series but here is the challenging problem I need to solve. I've created an agent-based model that can model infectious disease transmission and outcomes (such as tracking the number ...
1
vote
0answers
16 views

Cross validation on unbalanced datasets using a simulation approach on a subset of data

Within my field I often end up using linear regression to look at two variables, normally how some factor (e.g. size) changes through time. I'm increasingly coming across datasets that are unbalanced ...
0
votes
0answers
11 views

Better than expected bias corrected estimator for scale parameter of Logistic random deviates based on sample standard deviation?

Background: Using the quantile function (inverse cumulative distribution) for the Logistic distribution supplied with uniform random deviates (per the RAND() spreadsheet function), I was testing ...
3
votes
2answers
33 views

Simulating random variables from a discrete distribution II [duplicate]

I have the following discrete probability distribution where $p$, $q$ and $r$ are known constants: $P(X=0)=q$, $0<q<1$ $P(X=1)=1-p-q-r$, $0<p+q+r<1$ $P(X=2)=p$, $0<p<1$ $P(X=3)=...
1
vote
0answers
27 views

R gamlss - fitting and simulating lognormal response

I believe I am making a mistake in parametrization in this case. My goal is fit a lognormal model to data using gamlss in R, then simulate from that fitted model. ...
0
votes
0answers
70 views

Aggregate time-series forecast from individual probabilities

I'm conceptualizing a methodology for a time series forecast but I lack the terminology and even the notation to learn more or even adequately describe it. Suppose I aim to forecast the aggregate ...
0
votes
0answers
9 views

Simulate chaning probability over time?

I want to simulate the number of requests that an application receives over time. The probability that someone will make a request changes over time with peaks at 8am and 5pm. How would I go about ...
1
vote
0answers
8 views

simulation of a time to event covariate

I want to create an event variable that follows Weibull distribution. The important thing is that the variable should be a combination of a few other observed variables. Eg: Death is the time to ...
1
vote
0answers
6 views

How to modify the baseline hazard in Weibull regression according in r?

How can I specify baseline hazard function in r for Weibull regression* according to my preference, i.e in my research problem my time scale is age and the follow-up starts from age 30 and ends at the ...
2
votes
1answer
40 views

Simulate normal distributed real data (phenotypes) from genotypic data in R [closed]

I am trying to understand how the process of simulation works. I come from the biology, so many of this concepts are new to me. In the firs place, I am going to define what I have available and what ...
1
vote
1answer
13 views

Some thoughts on finite sample properties of an estimator

I derived the mean squared errors (MSE) of a consistent estimator for two models: restricted and unrestricted. In addition, I showed that both has the same rate of convergence (that is, the asymptotic ...
2
votes
1answer
30 views

Generate random dataset from constrained quantile statistics [closed]

In order to study k-nearestneighbors with a more concrete example than the iris dataset with my students, I would like to generate data for age weight sex based on the statistics of [cdc.gov for ...
3
votes
3answers
143 views

Simulating values from a random variable that is a sum of other random variables

$X$ is $\mathcal N(0,4)$, $Y$ is $\mathcal N(0,5)$, $Z = X + Y$ I need to simulate 1000 values for each of these variables, $X$,$Y$,$Z$. I have simulated 1000 values for both $X$ and 1000 values for ...
0
votes
2answers
23 views

Simulation study for anomaly detection methods in time series

Im trying to compare some anomaly detection methods for time series. Since there are not many time series with labeled outliers I decided to do a simulation study. I'm doing the simulation in R using ...
0
votes
1answer
37 views

Simulation of correlated stochastic processes based on some time series

I'd like to simulate power output time series of other wind farms based on measured outputs of one (or more) wind farms. Specifically, I have data on power outputs of wind farm ...
0
votes
1answer
44 views

Generating censoring times for the cox proportional hazards model

I am trying to understand the different ways of simulating survival times in a cox proportional hazards model. A simple example consists in simulating the event times following a Weibull distribution. ...
0
votes
0answers
11 views

How to simulate data from an existing logistic regression model using both categorical and continuous variables in R

I fitted a logistic regression model and would want to simulate data from the model (with different factors and continuous variables). I have seen similarly asked questions and have gone through the ...
1
vote
1answer
32 views

MCMC inside Expectation Maximization

I wish to optimize the following likelihood function for parameter $\Theta$: $$p(D|\Theta)=\int_X\int_Y p(x, y, D|\Theta)dydx$$ where $X$ and $Y$ are latent variables and only $D$ is observed. I ...
2
votes
1answer
33 views

Time series simulation based on a given time series

I’m looking for some procedures to simulate time series based on another time series as an input. The objective is that it may provide me with more training datasets that are similar to the given ...
2
votes
1answer
31 views

Power simulation on glmer.nb gave strange results

I would like to ask for solution or advice on strange result that glmer.nb from lme4 generated when simulating using simR package. I’m working on longitudinal gut microbiome abundance data (23 ...
0
votes
0answers
13 views

How to simulate an Arima process with random regressor

I'm trying to simulate an arima process with a random regressor that has a certain amount of correlation to the dependent time series. I'm aware of two methods to create simulations of arima models: ...
0
votes
0answers
26 views

Calculate fifth and sixth polynomials for Headrick (2002) method for non-normal multivariate distribution

I am trying to perform a 3-variable correlated multivariate Monte Carlo simulation. As the asset class returns are non-normal, I found the following function ...
0
votes
0answers
12 views

Basic Bayesian reinforcement learning algorithm for proportions in R

I'm trying to simulate results from a basic psychology experiment, in which a rat is presented with two levers. Pressing Lever A probabilistically delivers a food pellet at rate $a$. Likewise, Lever B ...
1
vote
1answer
30 views

Hypothesis test with simulated data

A simulation gave me the following density of data (grey histogram, blue kernel density estimation). Having an alternative input $I^*$ with the same distribution (green line), I would like to check ...
0
votes
1answer
20 views

Transforming a random sample [duplicate]

For a dsitribution $p(X)$, let $x_1,\ldots,x_n$ be an independent sample of $p(X)$. Consider the one to one transformation $h(\cdot)$ such that $Y = h(X)$. If we apply the transformation to each of ...
0
votes
0answers
9 views

Should I model co-variance structure in MCMC model for simulation. Or the posterior parameters will have some correlation due to how MCMC works

I am willing to simulate new data points coming from a dataset. The simulated datasets will be used for sampling experiments prior to training machine learning models to the original data using cross-...
2
votes
1answer
59 views

What should be the burn in period for Metropolis-within-Gibbs?

I need to get samples from an unnormalized distribution $p(\theta, \tau | D)$. However, sampling directly from the joint distribution with Metropolis-Hastings is hard, as the sampler rarely finds ...
1
vote
1answer
26 views

Restricting Binomial Success Rates in simulation

Suppose I am generating 10000 data points with probability P out of N total trials, but I know that P x N can never be below M, where M < N. How would I go about restricting my simulation to never ...
1
vote
0answers
55 views

How to simulate predicted probabilities

Can you help me out with the following brain twister? I have a prediction model to estimate the probability (p) of a sale for each potential customer. On average, p is 0.003. (So there is approx. one ...
1
vote
1answer
24 views

I need to construct function that gives out data of specific pdf function and draw histogram of it [closed]

So, the given density function is: $\theta x ^{\theta - 1}, \ \ if \ \ 0<x<1 \text{ and } 0 \ \ \text{ otherwise}$. $\theta$ is given as 2. I also need to draw a line that corresponds the ...
2
votes
2answers
90 views

AR(1) with known initial and terminal condition: how to draw the innovations?

Suppose I have the following stationary $AR(1)$ process: $$ y_{t}=\alpha_{0}+\alpha_{1}y_{t-1} + u_{t} $$ where $u_{t} \sim \mathbb{N}(0,\sigma^{2})$, with $\sigma^{2}$ known. Suppose I have an ...
0
votes
1answer
20 views

Isn't a simulation a great model for model-based reinforcement learning?

Most reinforcement learning agents are trained in simulated environments. And the goal is often to maximize performance in this same environment. Why is the simulation not used for planning in these ...
0
votes
1answer
28 views

How to simulate spatial point patterns that have spatial structure similar to that of given spatial point pattern?

I have some spatial point pattern X distributed in polygon wind and I wonder how can I simulate different point patterns that by their spatial properties (for example, number of points, spatial ...
0
votes
0answers
49 views

simulation in r

i have the following data: ...
1
vote
1answer
14 views

Safety stock calculations using Intermittent Bootstrap

Together with fellow students, I’m working on an assignment to calculate safety stock levels in case of intermittent demand. We’re already able to simulate the demand like in the paper of Willemain, ...
4
votes
1answer
68 views

Wilcoxon Rank Sum Test vs $t$-test Power Simulation

It is well known that the Wilcoxon rank sum test is more powerful for detecting shifts in location when the data is non-normal. However, I am conducting a brief simulation study and my results ...
1
vote
0answers
36 views

How can I simulate a student-t copula in R based on marginals?

I'm trying to simulate the joint distribution of Brent oil prices and an exchange rate to compare it to the empirical distribution. For this, I have been following this article: https://...
0
votes
1answer
29 views

Random Sampling from Farlie-Gumbel-Morgenstern bivariate exponential distribution

I would like to obtain an algorithm for generating iid samples from Farlie-Gumbel-Morgenstern bivariate exponential distribution (as described in the book by Johnson and Kotz as Gumbel's Model II ...

1
2 3 4 5
27