A vast area which includes generating results from computer models.

learn more… | top users | synonyms

0
votes
0answers
13 views

How to simulate from a log-copula function?

Does anybody know how to simulate from a log-copula function? I'm trying to simulate $(u,v)$ from a log-copula function with the CDF: $$ C(u,v, a) = \exp\bigg(1-\big[(1 - \ln u)^a + (1 - \ln v)^a - ...
7
votes
1answer
67 views

Distribution of p-values - Binomial test

I heard that under the null hypothesis the p-value distribution should be uniform. However, simulations of binomial test in MATLAB return very different-from-uniform distributions with mean larger ...
0
votes
0answers
10 views

Can one use the RTS (Rauch–Tung–Striebel) smoother to simulate latent factors (as opposed to Carter and Kohn procedure)?

It is a little surprising that I have not found anything online in the literature which clarified this. I am working on an MCMC Gibbs sampling procedure to calibrate a "dynamic factor model". One of ...
1
vote
0answers
19 views

Simulation and sampling

I am working on a question which involves an experiment to determine relationship between IQ level and subject. He models the distribution of scores as a mixture of 2 normal distributions. Then he ...
1
vote
0answers
8 views

Simulate a variable taking into account plausible values

I have a variable “lifetime highest degree”, which has 4 categories. I need to simulate it on individuals from a database. For this simulation, I used parameters from multinomial logit regression ...
1
vote
1answer
34 views

Forecast bayesian GARCH model

I am using this package in R to do Bayesian estimation of GARCH models. I want to forecast $y_t$ (i.e. the mean equation), but it seems that the package has no built-in function for this. The model ...
1
vote
1answer
35 views

Simulate non-normal data for multiple regression

In a working paper, Luo (2011) analyzes generating non-normal data, using Fleishman power method. But this approach just can be used for specific skewness and kurtosis. I would like to simulate ...
1
vote
0answers
7 views

making replicate for fixed covariates from Generated samples from Poisson regression

I have a Poisson regression equation. $$ \mu_i= exp(\beta ^{_{0}}+\beta _1x_1i +\beta _2x_2i ), i=1,...,n $$ Say n=20. Covariates are chosen randomly from (0,1). And beta0=1, beta1=.01, beta2=.5. ...
2
votes
3answers
49 views

Question regarding form of a cost function while training a model

I am beginner in Machine Learning and I am very interested in modelling, simulation and all this jazz :) One of the basic idea I learned so far is the use Cost Function and its minimization in order ...
0
votes
1answer
25 views

simulation of endogenous skewed regressor

I have a question regarding endogeneity. I have to simulate a variable that is skewed and at the same time correlated with the error term, whereas the error term, as well as two other exogenous ...
1
vote
1answer
17 views

Create simulated path model dataset and save to CSV [closed]

I am teaching a multivariate stats class and wanted to give people some simulated datasets with mediation, path modeling, and other features. I know it's possible to run monte carlo studies in MPlus, ...
0
votes
0answers
15 views

How to interpret the results of geweke.diag() function present in Coda package of R?

I am using geweke.diag() to check the convergence of an MCMC chain, I am using following R-Code for the purpose ...
1
vote
1answer
47 views

Poisson Process in R from exponential distribution

I am trying to simulate a poisson process sample path in R by starting off with exponentially distributed random variables. For example, for a value of $\lambda=0.5$, I can generate 500 samples and ...
0
votes
0answers
33 views

How to demonstrate biased estimates of linear regression vs cox proportional hazard survival analysis in R?

I want to perform a really simple simulation of right censored data. Then I want to draw a kaplan meir survival curve and do a cox proportional hazards test. Then I also want to perform a simple ...
0
votes
0answers
17 views

Possible Monte Carlo usage for defining t?

I have the following question. As a part of a research, I am trying to determine based on repository contribution factors which users can be classified as core developers, that is, developers that ...
0
votes
0answers
8 views

Successfully simulated physical process, matches truncated/incomplete data…now what?

What's Being Simulated I have data from a device that tests a physical process. The data are independent Bernoulli trials. Each test series yields a distribution of these trials with different N and ...
2
votes
0answers
20 views

Iman-Conover rank correlation method & multivariate normal distribution

I am working on some simulations using the Iman-Conover method to sample correlated random variables so I can have a 'population' Spearman correlation parameter as opposed to a Pearson correlation ...
1
vote
1answer
22 views

Paired or independent samples test when doing computer simulation experiment

I am doing a computer simulation experiment on two different operating systems (OS1,OS2), comparing performance (Measure 1, Measure 2) of two software products (P1,P2) under simulated stress ...
1
vote
0answers
8 views

Power of a case control test as a function of P(X=1) & P(Y=1)

For our course in statistics we had to build a simulation which would give insight in the power of a case-control study vs that of a cohort study, both trying to discover an association between 2 ...
1
vote
0answers
39 views

How to simulate data in R given mean, median, and range?

I would like to simulate n numbers (all within the range between a and b, n being an even number) using R, and the mean (u) and median (m) is given. If I use runif then the standard deviation is ...
3
votes
1answer
266 views

How to generate a specific number of random binaries with probablities proportional to given values?

I have such a matrix in an excel sheet. It has 140 cells. I want to generate 20 binaries randomly. However, the probability of generating "1" in each cell is proportional to cell's value. Namely, ...
4
votes
1answer
121 views

Variance reduction technique in Monte Carlo integration

I have some trouble understanding the variance reduction method called "Antithetic variables": Suppose that the integrand is $g(x)=x^2$ and the reference density $f(x)=e^{-x}I_{[0,\infty]}$ is ...
7
votes
1answer
192 views

Generating Binomial Random Variables with given Correlation

Suppose I know how to generate independent Binomial Random Variables. How can I generate two random variables $X$ and $Y$ such that $$X\sim \text{Bin}(8,\dfrac{2}{3}),\quad Y\sim ...
3
votes
0answers
58 views

simulating birth death process with random numbers from negative binomial

I am trying to generate random deviates for the population size at time $t$ for a birth-death process with constant birth and death rates per individual and initial size $N_0 \gt 0$. For the simple ...
1
vote
0answers
12 views

Simulating Correlated Normal Random Variables Given Uniforms

I want to simulate $3$ Normal random variables given their expectations, variances, correlations and three independent uniform $(0,1)$ observations. Is my method correct? First, produce three ...
0
votes
1answer
53 views

How to translate percentage decline into a regression slope?

I want to model a negative relationship of count/binary data over 10 years with a known value for the decline rate (in percentage). However, I have problems in calculating the correct slope value for ...
3
votes
0answers
23 views

Simplification of my Hasting-Metropolis ratio

I am considering the following model : $$ y_{i,j} = f(x_{i,j},\beta,b_{i},d) + \varepsilon_{i,j} $$ where : $1 \leq i \leq s$ $1 \leq j \leq n_{s}$ $\beta$ is a (vector of) fixed effects $b_{i} ...
1
vote
0answers
17 views

How to determine how many simulations to run, in order to illustrate “extreme-valued statistics”?

As an engineer trying to learn statistics, I wonder if someone could please recommend references / a statistical method that may assist with determining the number of simulations that need to be ...
1
vote
1answer
35 views

How to incorporate parameter constraints in Metropolis Hastings

I am working on parameter estimation of GARCH model with Metropolis Hastings. But the results I have got doesn't look reasonable, actually it is quite different from what I have got from Gibbs ...
2
votes
2answers
32 views

Why is simulation used for probit choice probabilities?

As explained in this answer, the probability of a certain outcome in a Logit model can be written as $$ P=\int_{\varepsilon=-\beta'x}^{\infty} f(\varepsilon)d\varepsilon\\ = 1- F(-\beta'x) = ...
6
votes
1answer
76 views

Simulate from a truncated mixture normal distribution

I want to simulate a sample from a mixture normal distribution such that $$p\times\mathcal{N}(\mu_1,\sigma_1^2) + (1-p)\times\mathcal{N}(\mu_2,\sigma_2^2) $$ is restricted to the interval $[0,1]$ ...
0
votes
0answers
35 views

How to generate multidimensional data with specific clustering properties?

In section 5.A of a research paper the researcher used the following synthetic datasets: GAUSS consisted of six Gaussian clusters with identity covariance, each with 500 points in five dimensions. ...
2
votes
0answers
64 views

Omitted Variable Bias in Linear Regression - Simulation

Is the following a reasonable illustration of the OVB problem? We build up fictional data around the regression line: $$y = 7.2 + 2.3 \, x_1 + 0.1 \, x_2 + 1.5 \, x_3 + 0.013 \, x_4 + eps$$ by ...
2
votes
1answer
21 views

Correlation of one random variable and a binary variable dependent on it

I create one normal random variable using =NORM.S.INV(RAND()) in Excel and a binary variable =IF(B2>=0,1,0), where B2 is this random variable. If I continously resample, I find that their correlation ...
0
votes
0answers
22 views

Differencing a series and back

I've followed this procedure: I have a non-stationary process (call it 'series_1'), which I try to render stationary by differencing. The largest value of the process (8760 observations) is about ...
2
votes
1answer
74 views

simulate t-tests of mean differences

I would like to simulate t-tests of mean differences. I would like to simulate data based on 1) pre-specified (desired) mean difference between the variables and 2) desired t value 3) and p-value ...
0
votes
1answer
33 views

Simulating a dynamical system

Basically I need to replicate Hartley's 'A User's Guide to Solving Real Business Cycle Models' . Specifically (to make question relevant to stats.stackexchange), I want to simulate the dynamical ...
0
votes
0answers
21 views

transforming simulated data to have the desired mean and variance [duplicate]

I am working on simulation of data, and this is just the first step of what I am trying to do. I am first simulating data based on a correlation matrix (as this is what I want). I used the R code ...
1
vote
1answer
68 views

Power analysis for binomial test via simulation

Suppose a gene is mutated in 30% of the samples. I want plot the number of samples required to see 30% of them mutated at various level of power. I want to do this through a simulation so I ...
2
votes
1answer
64 views

How to draw a random sample from a Generalized Beta distribution of the second kind

For microsimulations, I (i) want to estimate parameters of an empirical distribution and (ii) draw a random sample based on the estimations. My random variable $Y$ seems to follow a Generalized Beta ...
3
votes
0answers
29 views

Generating column stochastic random matrix with target row sums

I want to populate a 0-1 matrix, which is an adjacency matrix, corresponding to a directed graph, with weights on the elements that are 1. In other words, I want to generate an $N\times N$ matrix $A$ ...
2
votes
0answers
22 views

Simulating Case-Control-Covariate Data

I generate data with a covariate $Y_1$ and disease liability $Y_2$ using the following model: $\begin{pmatrix}Y_1\\Y_2\end{pmatrix} \sim \mathcal{N}\left( ...
2
votes
1answer
134 views

simulating data with a lot of predefined constraints in R

how to simulate data (in R) to generate , sample values 1) variables with specific correlation values for a particular model AND 2) with predefined regression coefficients? 3) Can we also set the ...
0
votes
0answers
178 views

A practical question in simulating real world outcomes

PredictWise aggregated polling data and, for each state, estimated the probability that the Obama or Romney would win. Here is the polling data. The data frame has 51 rows(51 states). the name of this ...
1
vote
0answers
25 views

On sampling from all the continuous functions in [0,1]

I was watching this youtube video for motivation on measure theory and at the 7:20 mark a reason for utilizing measure theory is given; to be able to pick a random function from all the continuous ...
2
votes
2answers
312 views

Why doesn't my Wiener process simulation work?

The Wiener process at time $t=0$ is $0$. It has independent increments, so $W_t-W_0 \sim N(0,t-0)$, but wouldn't it mean that $W_t\sim N(0,t)$ for every $t$? But if I try to simulate a a ...
2
votes
1answer
26 views

Adjusting Monte Carlo estimates to generate correct even moments - improving on antitthetic draws

If I want to generate a matrix 10,000 (row) samples of 3 uniform (uncorrelated) variables it is trivial to use antithetic draws to ensure the odd moments such as the mean equal their "true" value. ...
1
vote
0answers
15 views

Are Lyapovov exponents related to statistical precision?

In my understanding, Lyapunov exponents measure the average rate of separation of near-identical chaotic trajectories, while statistical precision, in the context of a predictive model, is a measure ...
0
votes
0answers
9 views

Simulating an ODE model with non-constant parameter

I have a model, I can formulate the model using ordinary differential equation with parameter $P$. I want to simulate the model, but instead of using a fixed constant $P$ for the parameter, I want to ...
0
votes
0answers
53 views

Simulate Autoregressive Conditional Poisson data

Currently, I am doing the simulation with Autoregressive conditional Poisson (ACP). To test whether my parameter estimator is better than MLE (by comparing the biasness), first, I have to generate ACP ...