Skip to main content

All Questions

Tagged with
3 votes
1 answer
71 views

How to show in R, using a simulation, that when sampling from a normal distribution, the sample mean and sample variance are independent

What is the best way to show that when sampling from a normal distribution, the sample mean and sample variance are independent? I know the theory behind this result, I would like to show it using a ...
Carlos233's user avatar
1 vote
0 answers
115 views

Tightness of rejection sampling

Hello. I'm studying the Monte Carlo Statistical Method textbook by Robert and Casella. I have a question about exercise problem 30 in Chapter 2. I've already solved parts (a)-(c), but I'm having ...
urikokp's user avatar
  • 31
1 vote
0 answers
55 views

Understanding and simulating a classic linear regression model with fixed coefficients

I had used the GPT chat to ask some straightforward questions. However, one of the responses left me feeling quite confused. Currently, I am studying the classical regression model given by $$y_t = ...
André Goulart's user avatar
0 votes
1 answer
102 views

Auxiliary randomization and the generalized CDF inverse

I'm trying to solve Homework 4 from professor Ryan Tibshirani's class on "Advanced Topics in Statistical Learning" [pdf] at UC Berkeley. It deals with basic facts about CDFs and quantiles. ...
Pedro Rodrigues's user avatar
3 votes
0 answers
93 views

Generating uniformly distributed particles on a $n$-dimensional flat torus or periodic hypercube [closed]

I am trying to generate evenly distributed particles in an $n$-dimensional flat torus or a periodic hypercube. I am not sure if any of this approaches suffices. Can you suggest alternative methods for ...
Rober's user avatar
  • 31
1 vote
1 answer
74 views

Defining censoring level in survival analysis

I'm conducting a simulation analysis using the Exponential, Weibull and Gompertz distribution. To get the times I'm using the table from Austin 2012. But how can I define the censoring level to be ~...
Seb's user avatar
  • 59
2 votes
1 answer
352 views

Simulating AR(2) Process With Initial Conditions

Consider a system process given by $$x_t = -0.9x_{t-2} + w_t, \hspace{2mm} t=1,\dots n$$ where $x_0 \sim N(0,\sigma^2_0), x_{-1} \sim N(0,\sigma_1^2)$, and $w_t$ is Gaussian white noise with variance $...
Pame's user avatar
  • 331
4 votes
2 answers
598 views

How to simulate data of a random intercept effect model in R?

I want to simulate data of the following random intercept effect model in R $$Y_{ij}=\alpha+\beta x_{ij}+u_{0,i}+\epsilon_{ij}$$ $$u_{0,i} \sim N(0,\tau^2)$$ $$\epsilon_{ij} \sim N(0,\sigma^2)$$ Here ...
user10386405's user avatar
1 vote
0 answers
41 views

Generating random variates knowing the density function

Let's consider a random variable that is following the distribution with the density function as below: $$f(x) = \begin{cases} \sum_{i=1}^{\infty} 3.5i(0.3)^{i-1}e^{-5ix} & \text{for $x>0$} \\ ...
bajun65537's user avatar
0 votes
0 answers
17 views

Calculating the sample cumulative distribution function for a Kolmogrov-Simulation test to examine the goodness of fit with given data [duplicate]

I have sample data for 'Times between successive crashes of a computer system' which is for a 6 month period and the data is given in hours. The data in brief is : 1,10,20,30,40,52..... I need to use ...
Kumaran's user avatar
2 votes
0 answers
189 views

Monte Carlo integration with Control Variate not giving any variance reduction

Given $I=\int_{3}^{+\infty}\dfrac{1}{\sqrt{2\pi}}e^{-x^2/2} \, dx$, I want to use a Control variate function to reduce the variance of a simple Monte Carlo simulation to compute this integral. In ...
tomas-silveira's user avatar
18 votes
3 answers
11k views

Generating random points uniformly on a disk [duplicate]

I have to randomly generate 1000 points over a unit disk such that are uniformly distributed on this disk. Now, for that, I select a radius $r$ and angular orientation $\alpha$ such that the radius $r$...
Ghosal_C's user avatar
  • 357
2 votes
1 answer
344 views

Is constructing a simulated model for a fixed SNR possible in binary regression?

When studying variable selection techniques like step-wise regression and the LASSO, a few studies employ a signal to ratio measure in order to control the amount of variability in a simulation. ...
Guilherme Marthe's user avatar
0 votes
1 answer
405 views

Data generation process from an given regression model and monte-carlo experiment in R

I want to generate data in R to solve the following problem: Consider the following Data Generating Process (DGP) $Y_i = β_0 + β_1 · X_i + β_2 · Z_i + u_i$ , where $β_0 = 0.75$, $β_1 = 0.50$ and $β_2 ...
Daniel Ortiz's user avatar
3 votes
1 answer
52 views

Book recommendations on how to conduct simulations in the context of OLS and Structural Equation Modelling

The title really says it all. Does anyone have any recommendations for well-written books, preferably with plenty of examples, on how to conduct simulation studies in the context of OLS and Structural ...
PsychometStats's user avatar

15 30 50 per page
1
2 3 4 5