Question

In: Statistics and Probability

I need r code for the following: In each simulation case, 3000 independent Gaussian time series...

I need r code for the following:

In each simulation case, 3000 independent Gaussian time series of length n = 20, 50, 200, 800.

Thanks

Solutions

Expert Solution

In each simulation case, 3000 independent Gaussian time series of length n = 20, 50, 200, 800.

The statement means the following:

1. Length of a Time-series refers to the number of days in the the time-series.

2. Gaussian time series means that the observations of the time-series follow Normal distribution.

3. Independent time-series mens that the correlation between the two time-series is zero.

So, overall the statement means that there are 3000 Gaussian time series where in between any two of them the correlation is zero each consisting of 20, 50,200,800 days respectively.

R Code is as follows:

n = c( 20, 50, 200, 800 )
Data1=Data2=Data3=Data4= NA
for( i in 1:4 )
{
for( j in 1:3000 )
{
X=rnorm( n[i],0,1 )
if( i==1 )
{
Data1=cbind( Data1, X )  
}
if( i==2 )
{
Data2=cbind( Data2, X )  
}
if( i==3 )
{
Data3=cbind( Data3, X )  
}
if( i==4 )
{
Data4=cbind( Data4, X )  
}
}
}

----------------------------------------------------------------------------------------

Note: The Columns of Data1,Data2,Data3,Data4 are the required Gaussian Time-series.


Related Solutions

I need to time series plot the following data. I am confused since there are multiple...
I need to time series plot the following data. I am confused since there are multiple sections (441, 442, 443, 444, 445, 452, 4521. This is just two years worth of the data. Year Month Period 441 442,443 444 445 448 452 4521 1992 Jan 1 1.84 1.85 1.83 0.88 2.58 2.39 2.60 1992 Feb 2 1.83 1.85 1.83 0.89 2.62 2.34 2.53 1992 Mar 3 1.87 1.90 1.83 0.88 2.63 2.35 2.53 1992 April 4 1.89 1.91 1.91 0.89...
Consider the following time series.   (a) Choose the correct time series plot.     (i)...
Consider the following time series.   (a) Choose the correct time series plot.     (i) (ii) (iii) (iv)     - Select your answer -Plot (i)Plot (ii)Plot (iii)Plot (iv)Item 1     What type of pattern exists in the data?   - Select your answer - Horizontal PatternDownward Trend PatternUpward Trend PatternItem 2     (b) Use simple linear regression analysis to find the parameters for the line that minimizes MSE for this time series.       Do...
COMPUTER CALCULATIONS: I need to know how to code in R for the solutions, not by...
COMPUTER CALCULATIONS: I need to know how to code in R for the solutions, not by hand. 2. Look at the data in Table 7.18 on page 368 of the textbook. These data are also given in the SAS code labeled “SAS_basketball_goal_data” and R code labeled basketball goal data . The dependent variable is goals and the independent variable is height of basketball players. Complete a SAS /R program and answer the following questions about the data set: (a) Does...
Consider each of the following independent and material situations, identified below (i-v). In each case: •...
Consider each of the following independent and material situations, identified below (i-v). In each case: • the balance date is 30 June 2020; • the field work was completed on 12 August 2020; • the Directors’ Declaration and the Audit report were signed on 19 August 2020; • the completed financial report accompanied by the signed Audit report was mailed to the shareholders on 25 August 2020. (i) On 29 September 2020, you discovered that a debtor at 30 June...
USE R CODING! Pleaseee I need the code With R coding Obs: it supposed to use...
USE R CODING! Pleaseee I need the code With R coding Obs: it supposed to use probability density function like X ~ Binomial( n ,p ) dbinom(X=?, n, prob) pbinom(X=?, n, prob) rbinmo(幾個符合二項分配的X, n, prob) X~Poisson (lamda) dpois(X=?, lamda) ppois (X=?, lamda) rpois (X, lamda) **Suppose the random variable X obeys the binomial allocation B (n=100, p=0.1) (a) Use X as the binomial allocation to calculate P(12≤X≤14) (b) In practice, when np ≥ 5 and n(1-p) ≥ 5, X will...
I need this in R code please: Use the dataset ’juul’ in package ’ISwR’ to answer...
I need this in R code please: Use the dataset ’juul’ in package ’ISwR’ to answer the question. (1) Conduct one-way ANOVA test to test if the mean of igf1 of each level of tanner are the same? (2) What is the mean of igf1 in each level of tanner? (3) If there is any difference, which ones appear to be different? (Use pairwise t test for each pair of level with bonferroni method)
I need the code in SAS and R and outputs please 2. The data below come...
I need the code in SAS and R and outputs please 2. The data below come from a study investigating a method of measuring body composition, and give the body fat percentage (% fat), age and sex for 18 adults aged between 23 and 61 years. Source: Mazess, R.B., Peppler, W.W., and Gibbons, M. (1984) Total body composition by dual-photon (153GD) absorptiometry. American Journal of Clinical Nutrition, 40, 834-839. age % fat sex 23 9.5 male 23 27.9 female 27...
NEED IN C++ For the following programming problems, you need to time a section of code...
NEED IN C++ For the following programming problems, you need to time a section of code in C++. For example, the following statements time the execution of the function doSomething: #include clock_t start = clock(); doSomething(); clock_t finish = clock(); double overallTime = static_cast(finish - start)/ CLOCKS_PER_SEC; Consider the following two loops: //Loop A for(i = 1; i <= n; i++)    for(j = 1; j <= 10000; j++)     sum = sum + j; //Loop B for(i = 1;...
Following is a series of independent cases. In each situation, indicate the cash distribution to be...
Following is a series of independent cases. In each situation, indicate the cash distribution to be made to partners at the end of the liquidation process. Unless otherwise stated, assume that all solvent partners will reimburse the partnership for their deficit capital balances. Part A The Buarque, Monte, and Vinicius partnership reports the following accounts. Vinicius is personally insolvent and can contribute only an additional $23,000 to the partnership. Cash $ 144,000 Liabilities 49,000 Monte, loan 48,000 Buarque, capital (50%...
Let X and Y be independent Gaussian(0,1) random variables. Define the random variables R and Θ,...
Let X and Y be independent Gaussian(0,1) random variables. Define the random variables R and Θ, by R2=X2+Y2,Θ = tan−1(Y/X).You can think of X and Y as the real and the imaginary part of a signal. Similarly, R2 is its power, Θ is the phase, and R is the magnitude of that signal. (b) Find the probability density functions of R and Θ. Are R and Θ independent random variables?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT