A vast area which includes generating results from computer models.

learn more… | top users | synonyms

0
votes
0answers
14 views

alternative to the delta method for computing the variance & CI of products of probabilities

I'm trying to find a way to calculate the confidence interval of the product of probabilities without using the delta method or Program MARK. I am using a logistic-exposure model to estimate the ...
10
votes
3answers
198 views

Simulate a Bernoulli variable with probability ${a\over b}$ using a biased coin

Can someone tell me how to simulate $\mathrm{Bernoulli}\left({a\over b}\right)$, where $a,b\in \mathbb{N}$, using a coin toss (as many times as you require) with $P(H)=p$ ? I was thinking of using ...
0
votes
0answers
4 views

Simulating thousands of regressions and obtaining p-values [migrated]

I'm looking to do some basic simulation in R to examine the nature of p-values. My goal is to see whether large sample sizes trend towards small p-values. My thought is to generate random vectors of ...
0
votes
0answers
16 views

Maximum likelihood Simulation R code [closed]

i made mle simulation code in R software by using stats4 library but i am not getting correct values of estimated parameters.As,my range of x involves parameter .and how to apply constraints . please ...
0
votes
0answers
4 views

Evaluate (user-defined) variance estimators in simulation environment?

I'd like to examine how a variance estimator that I constructed for complex surveys behaves in simulation environments, in a manner similar (and perhaps much simpler) to what Li and Levy (2009) at the ...
1
vote
1answer
29 views

Estimating normalization constant with Monte Carlo integration

Be $f(x)$ a function. Suppose that $f(x)$ integrates to a finite value $k$: $$\int_{-\infty}^{\infty}f(x)dx=k$$ The normalization constant of $f(x)$ is $1/k$. Monte Carlo integration can give an ...
0
votes
1answer
16 views

Why use Coded Variables in Experimental Design?

Full-disclosure, I'm not sure if this ENTIRELY on-topic. Often times, most texts will suggest that we code our variables. i.e. If we move from 345 to 350 to 355, we code our variables as -1, 0, and ...
0
votes
0answers
9 views

Diffrence in required sample size for estimating a trend with GEE in longitudinal Data

I am currently working on GEE's for longitudinal data and the model I am using to simulate and evaluate the data is: $y_{ijk}=\beta_1+\beta_2\cdot j+\beta_3\cdot k+\beta_4 \cdot j \cdot ...
0
votes
0answers
11 views

regarding generating synthetic data simulating the real data

We are trying to develop some predictive models. The current scenario is that we have to rely on synthetic data at first since the real data set will not be available quite soon. It is understandable ...
0
votes
0answers
16 views

Efficiently sampling from Markov Chain with low-probability transitions

I need to sample a large number of paths from a Markov Chain with known state transition matrix $T$, where some of the state transitions are low probability (~0.01%). For example, I might have a large ...
1
vote
0answers
30 views

Endogeneity for logistic regression

I would like to construct a setup where there is endogeneity between a binary independent variable and (in the latent formulation) the logistic noise. The set up has to be easy to simulate and ...
4
votes
1answer
43 views

Question about accuracy in Monte Carlo integration

Suppose that we want to estimate the integral: $$\psi=\int_{a}^{b}h(x)dx.$$ Let $\hat{\psi}$ be the Monte Carlo estimator. As far as I know, if we desire an accuracy up to the fourth decimal, we need ...
3
votes
0answers
24 views

Obtain marginal CDF from joint CDF by simulation

How can I evaluate the marginal cumulative distribution function of a set of random variables for which I do not have the CDF in closed form. I can, however, simulate from a joint distribution ...
11
votes
2answers
194 views

fat-finger distribution

Brief question: Is there a fat-finger distribution? I'm sure that if it exists, then it has a different name. I don't know how to formulate it as an analytic function. Can you help me either find ...
5
votes
1answer
67 views

monte carlo simulation using exponential distributions

I'm trying to simulate a stochastic model of deterministic exponential population growth, where $dN/dt = rN$ where $N$ is population size and $r$ is rate ($t$ time). I'm assuming there's no carrying ...
0
votes
0answers
29 views

Why don't I get intervals which don't contain parameter by simulation?

I effect 100 simulations, and with a confidence level 95% I expected to get by simulation 5 coinfidence intervals approximately that not contain the paramater. I always get 100 confidence intervals ...
2
votes
0answers
44 views

Bootstrapping in Binary Response Data with Few Clusters and Within-Cluster Correlation

Beware: This is (almost) a cross-post to a thread I started on the Statalist but that has not received much attention so far. Introduction I am learning about the problems when conducting ...
1
vote
0answers
19 views

Simulate similar data to get around data sharing rules?

Sometimes there are very nice datasets that have very strict data sharing rules. This makes it difficult to legally share the data so that others can build upon them. I'm interesting in finding out ...
0
votes
0answers
22 views

Simulation of time series from pdf function, defined for each time step, with aucorrelation

I have a model defined by $\mathbf{X}= (X_{1}, X_{2},... X_{t} ... X_{M})$, where for each $t$ (time step) $X_{t}$ follow a distribution ${D(\alpha_{t}, \beta_{t} )}$. I want to generate time series ...
0
votes
0answers
13 views

How to make educated guess about movement of people through graph?

I have data about weekly counts of people on entry points (orange circles on the picture below) and need to make educated guess about their counts at destination points (marked by green stars). I know ...
0
votes
0answers
39 views

Is this sample drawn from the normal distribution ? using information from both mean and standard deviation

After correcting for a bug in my code in a previous question, I could simulate efficiently thousands of samples from the normal distribution N(0,1). I calculated the mean and standard deviation of ...
5
votes
1answer
84 views

Sampling 100000 times from normal distribution in R : strange distribution of samples' standard deviation

I generated, in R, one hundred thousand random samples of ten values from the normal distribution with mean zero and unit standard deviation, and registered each mean and standard deviation, in hope ...
0
votes
0answers
25 views

Monte Carlo Simulations: Can I Use Real Data as Universe?

In Monte Carlo simulations, it is a commonly used procedure to generate synthetic data based on a large survey (e.g. a microcensus) first. These synthetic data is then used as universe/population for ...
7
votes
0answers
51 views

How can we simulate from a geometric mixture?

If $f_1,\ldots,f_k$ are known densities from which I can simulate, i.e., for which an algorithm is available. and if the product $$\prod_{i=1}^k f_i(x)^{\alpha_i}\qquad \alpha_1,\ldots,\alpha_k>0$$ ...
0
votes
0answers
13 views

spatial point process [on hold]

I simulate locations of nonhomogeneous poisson process with intensity depending on covariate log(x) and intensity lambda(x)= betaexp(alphalog(x)). x<- seq(0,1,by=0.1) lambda<- function(x){ ...
0
votes
0answers
36 views

Applying Meta Analysis Findings to predict future outcome

Can Meta Analysis results be used to predict future outcome? If yes, How? I am reviewing a Meta Analysis Report ( I haven't prepared this report). It is about treatment of hypertension in elderly ...
3
votes
2answers
47 views

How to simulate from a t copula?

This is a question related to: How to simulate from a Gaussian copula? Suppose that I have two univariate marginal distributions, say $F$ and $G$, which I can simulate from. Now, construct their ...
0
votes
0answers
29 views

Simulating data from a given multivariate covariance matrix - workarounds for a non positive definite covariance matrix?

As part of a simulation study, I would like to create multivariate data that follow a specific covariance matrix in R. In this study I would like to be able to show that my algorithm is able to find ...
1
vote
0answers
15 views

Parametric bootstrap in generating returns and hypothesis testing

I am trying to test a hypothesis of a statistic calculated from portfolio returns. To do so I estimate a model on the original returns series and want to obtain 100 bootstrapped series using ...
0
votes
0answers
24 views

Approximating the conditional expectation in simulations

I am simulating stock returns, which are governed by the following equations $r_t = \mu + \delta r_{t-1} + \varepsilon_t$ $\sigma^2_t = \omega + \alpha \varepsilon_{t-1}^2 + \beta \sigma^2_{t-1}$ ...
2
votes
2answers
57 views

Generating data from KM curves

I have some survival data from different cohorts and can fit Kaplan Meier curves and cox proportional hazard models. I want to be able to simulate data that resembles the data found in say the KM ...
0
votes
0answers
21 views

Simulating a media coverage time series starting from a set of events

I want to simulate a time series of media coverage starting from a series of "events" of different "importance". I started generating the events, by applying to each day a very skewed inverse ...
3
votes
2answers
76 views

Simulating a stochastic integral

I am trying to solve exercise 3.9.10 on p. 66 of Ubbo F. Wiersema's "Brownian Motion Calculus" (John Wiley & Sons, 2008), which asks to simulate the stochastic integral $$ \int_0^1 B(t)\ dB(t) $$ ...
2
votes
0answers
17 views

Best way to measure how well stochastic models fits a system of differential equations?

I have a system of differential equations which can be easily solved using ode45 in matlab. The equations represent a biochemical pathway. I have simulated the same biochemical pathway ...
0
votes
0answers
18 views

How to implement MCMC sampling of a non-standard distribution

Given that I know the distribution to a constant. What sampling method? MH(SGMCMC) or slice sampling? More importantly, what tools/package can I use to impelement the sampling directly(input the ...
1
vote
0answers
46 views

Checking for Missingness mechanism

This code is for simulating missing mechanism randomly that I extracted it from imputeR package : ...
4
votes
1answer
43 views

Making simple simulation to confirm power of statistical test?

Might seem odd by I'm trying to make a simple simulation to verify some power calculations that I'm finding with the package pwr in R (https://cran.r-project.org/web/packages/pwr/pwr.pdf). What I did ...
1
vote
0answers
40 views

lemma proof for alias method for generating discrete random variables

I'm looking to prove the lemma written in chapter 11, page 274 of Sheldon M. Ross's Simulation, regarding the alias method for random variable generation. As a prelude to presenting the method for ...
0
votes
1answer
14 views

Uncertainty in Enumerated Data

I am interested in assessing possible uncertainty in enumerated data. To do this, I randomly pick 80% of the enumerated data to predict the remaining 20% through a regression analysis. I reapeat the ...
6
votes
1answer
230 views

How to generate a more accurate distribution of sample of random variates?

I want to generate a sample of random variates choosing 5 out of 7 days of the week, $X_1,\ldots,X_5$, such that the aggregate counts resemble a given day-of-week profile, namely ...
0
votes
0answers
18 views

Optimization with bootstrapping, can it be done like described below?

so far I have not used bootstrapping extensively and only know "1-D"-examples, but I'm wondering if it might help with the following problem: Assume I have n customers, and that I conducted several ...
1
vote
1answer
31 views

Why does power (other conditions equal) decrease as the odds ratio increases above 2?

I am simulating a logistic regression setting (P(Y=1|x). Estimated proportion of patients with a poor feature at time zero is 40%. I am generating 1000 replications per scenario, sample size ranging ...
1
vote
0answers
21 views

Monte Carlo Simulation for Sale Executives [closed]

I'm trying to simulate the sales process for a Service Company. The core of the process goes this way on a time period: A team of sales executives go visit possible clients.If the visit is ...
0
votes
1answer
39 views

How to Simulate Random Multivariate Correlated Data and Uncorrelated Data for a given correlation coefficient and P value in R? [duplicate]

I want to simulate data with the same effect sizes and structure of my real data to perform sensitivity analysis for a pathway analysis(sem). Wesley has ...
4
votes
2answers
34 views

Why is rejection sampling with acceptance probability 2/3 for Beta(2,2) not slower than `rbeta(N,2,2)`?

I was trying to illustrate that rejection sampling is inefficient when an alternative approach is available that does not throw away samples. (This post obviously is a candidate for migration to SO, ...
0
votes
1answer
23 views

Simulating from a skew normal distribution

I am analyzing a data set in R, the histogram gives an impression of a normal distribution, but the qqplot suggests a slightly skewed normal distribution, so I want to try this out as well. I fitted ...
0
votes
0answers
19 views

Confusion about coxph function/model

When comparing two arms of a trial, the idea is to imagine that each patient receives both treatment A (control) and treatment B essentially in two parallel worlds. Obviously this can't work and so a ...
3
votes
0answers
23 views

Detecting discontinuities in irregularly-spaced data

I am running physics simulations. Sometimes a simulation has insufficient resolution and produces discontinuities in the output variables. These are very easy to spot by eye in a scatterplot. I would ...
0
votes
0answers
28 views

Rejection Sampling Not Giving Correct Distribution

I hope someone can check through all my steps to see where I made a mistake: I wish to create a sample with the density $\ f(x)=\frac{1-x}{(π-2)(x + 1)√x}$ using the [1,0] uniform distribution U, and ...
0
votes
0answers
10 views

Getting started with age demographic projection

I am trying to project the future age distribution of a population within an organization using (raw) data about the current distribution, as well as past data about entries and exits per age cohort. ...