Hi guys,
I am currently trying to program (this is the first semester I have ever used Eviews)
1) Create 100 observations from gamma distribution - I understand to use @rgamma (b,r)
2) Calculate the average of this sample
3) Repeat steps 1,2 one hundred times to get a data set that would have 100 estimates of mean coming from these randomly generated data sets
I'm not sure how to loop this, as the examples in the tutorial are mainly regression related.
Any hints, help would be greatly appreciated.
Thank you
Creating sampling distribution
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Creating sampling distribution
Code: Select all
create u 100
vector(100) means
for !i=1 to 100
series rand = @rgamma(b,r)
means(!i) = @mean(rand)
next
Re: Creating sampling distribution
Thank you very much Eviews Gareth!
May I ask one further question, I've run this program and when I check the means there are a few N/A entries e.g. I only got 39 observations out of 100 run
Is this supposed to happen?
I am using (2,1) for (b,r) in the gamma function if it is relevant.
Thank you
May I ask one further question, I've run this program and when I check the means there are a few N/A entries e.g. I only got 39 observations out of 100 run
Is this supposed to happen?
I am using (2,1) for (b,r) in the gamma function if it is relevant.
Thank you
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3798
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Creating sampling distribution
The program ran fine for me in version 7.
Is your EViews uptodate? Any chance you made a typo?
Is your EViews uptodate? Any chance you made a typo?
Re: Creating sampling distribution
Hi startz,
The code is fine now. It appears there was an issue with the Citrix client.
Thank you for taking the time to verify the code!
The code is fine now. It appears there was an issue with the Citrix client.
Thank you for taking the time to verify the code!
Who is online
Users browsing this forum: No registered users and 2 guests
