Re: [R] Simulate values

2015-04-07 Thread Kehl Dániel
:28 To: Kehl D�niel T�rgy: Aw: RE: [R] Simulate values Hey Daniel, Thanks for your answer. I changed my commands and ended up with: matrix <- matrix(rnorm(500 * 40, 10, 5), ncol = 40, nrow = 500) variances1 <- apply(matrix, 1, var) variances2 <-(40 - 1) * variances1 / 25 What do you thin

Re: [R] Simulate values

2015-04-07 Thread Greg Snow
Thanks for your final paragraph, we sometimes see people who want us to do their homework for them and that does not go over well, but I think you situation is one where many would be happy to help. So here are some hints to help: The rnorm command expects the standard deviation, not the variance

Re: [R] Simulate values

2015-04-06 Thread Kehl Dániel
7. 0:52 To: r-help@r-project.org Tárgy: [R] Simulate values Hello, I'm facing the following task: Simulate 500 values of the statistic (n-1)s^2/sigma^2 based on taking 500 samples of size n=40 from the N(mu=10; sigma^2 = 25) distribution. I think with the following command: rep(rnorm(40,

[R] Simulate values

2015-04-06 Thread Osiris10101
Hello, I'm facing the following task: Simulate 500 values of the statistic (n-1)s^2/sigma^2 based on taking 500 samples of size n=40 from the N(mu=10; sigma^2 = 25) distribution. I think with the following command: rep(rnorm(40,10,25),times=500) I was able to simulate the samples but how I now ca

Re: [R] Simulate values from VAR

2012-03-01 Thread Pfaff, Bernhard Dr.
Hello Keith, see ?Acoef for retrieving the coefficients. Incidentally, in the package dse simulation methods are made available. Best, Bernhard Dr. Bernhard Pfaff Director Global Asset Allocation Invesco Asset Management Deutschland GmbH An der Welle 5 D-60322 Frankfurt am Main Tel: +49 (0)6

[R] Simulate values from VAR

2012-02-29 Thread Keith Weintraub
Folks, What is the best way to simulate values from a fitted "VAR {vars}" model. Also I have tried to use SVAR for a cointegration fit of y~x (just two univariate time-series) but I can't figure out how to set up the "A" matrix so that x_t can be used as a contemporaneous predictor of y_t. Th