Given a set of data, is there a way to have EVIEWS
a) Fit a normal distribution (based on some kind of best fit / ML estimation)
b) Fit another normal distribution (density) on top of the previous distribution (but with a smaller, user supplied standard deviation)
c) Find the area between the two curves in one tail from the intersection out (to infinity presumably given that it is a density distribution.)
?
Thanks for any help with this!
Chris
Fit, Plot, and Manipulate Distributions?
Moderators: EViews Gareth, EViews Moderator
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: Fit, Plot, and Manipulate Distributions?
Take a look at distribution graphs for (a) and (b).Given a set of data, is there a way to have EVIEWS
a) Fit a normal distribution (based on some kind of best fit / ML estimation)
b) Fit another normal distribution (density) on top of the previous distribution (but with a smaller, user supplied standard deviation)
c) Find the area between the two curves in one tail from the intersection out (to infinity presumably given that it is a density distribution.)
?
Thanks for any help with this!
Chris
Re: Fit, Plot, and Manipulate Distributions?
Ok, I see (and have done a), and I see how one might plot b on top of it (I could probably generate a random series in this case to do the trick), but how would I then find the area between the two curves where they intersect in the left tail?
Re: Fit, Plot, and Manipulate Distributions?
To clarify, check out the attached and plotted density function.
I could probably do a heck of a lot of calculus and calculations (give the complexity of the normal dist. function) and get an answer, but is there any easy EVIEWS way to calculate the area below the left tale of the blue line distribution and above the left tale of the red line distribution?
I could probably do a heck of a lot of calculus and calculations (give the complexity of the normal dist. function) and get an answer, but is there any easy EVIEWS way to calculate the area below the left tale of the blue line distribution and above the left tale of the red line distribution?
- Attachments
-
- DENSITY_COMPARISON.pdf
- (13.77 KiB) Downloaded 487 times
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Fit, Plot, and Manipulate Distributions?
I'm not certain that I understand. Do you want the integral of the difference for the regions to the left and right of the intersection?
Re: Fit, Plot, and Manipulate Distributions?
I'm sorry, that was very poorly worded and explained. Disregard the previous post, I feel like I have a much better grip on my question now.
Again, attached is a graph. What I'm trying to figure out is probably more of a statistics question than EVIEWS question.
I've found the area under the curve of the blue normal distribution left of the black line.
I'm trying to find the area under the blue curve represented by the area under the red curve to the left of the black line.
I can't simply find the area of the red curve (left of the black line) and subtract that from the blue area because each density curve adds to 1, make sense?
Also, is there anyway to extend the blue and red plot lines of the distributions to the x axis in EVIEWS?
Again, attached is a graph. What I'm trying to figure out is probably more of a statistics question than EVIEWS question.
I've found the area under the curve of the blue normal distribution left of the black line.
I'm trying to find the area under the blue curve represented by the area under the red curve to the left of the black line.
I can't simply find the area of the red curve (left of the black line) and subtract that from the blue area because each density curve adds to 1, make sense?
Also, is there anyway to extend the blue and red plot lines of the distributions to the x axis in EVIEWS?
- Attachments
-
- DENSITY_COMPARISON_TEST.pdf
- (13.38 KiB) Downloaded 432 times
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: Fit, Plot, and Manipulate Distributions?
Let's do a couple of quick calculations
Suppose the black line is 133,500,000.
Let the mean be 1.405e+08.
Let the standard deviation of the blue density be 4.575e+06
Let the standard deviation of the red density be 1.00e+06
Then the area under the curve to the left of the black line for the blue density is
The area to the left of the black line for the red density is
Now since we've got the normal, the blue density is always higher than the corresponding red density beyond the intersections so you can take the difference of the two.
Suppose the black line is 133,500,000.
Let the mean be 1.405e+08.
Let the standard deviation of the blue density be 4.575e+06
Let the standard deviation of the red density be 1.00e+06
Code: Select all
scalar black = 133500000
scalar mean = 1.405e+08
scalar bluesd = 4.57e+06
scalar redsd = 1.00e+06Code: Select all
scalar bluecdf = @cnorm((black - mean)/bluesd)Code: Select all
salar redcdf = @cnorm((black - mean)/redsd)Re: Fit, Plot, and Manipulate Distributions?
Thank you!!! That's exactly what I needed!
-
COPerezRoman
- Posts: 1
- Joined: Mon Nov 25, 2013 7:07 am
Re: Fit, Plot, and Manipulate Distributions?
To CPeter9:
How were you able to fit the normal distribution to your data? I have a set of data, and I'm trying to see which distribution best fits it. It'd be great to at least get a starting point to work with.
Best Regards,
COPerezRoman
How were you able to fit the normal distribution to your data? I have a set of data, and I'm trying to see which distribution best fits it. It'd be great to at least get a starting point to work with.
Best Regards,
COPerezRoman
Re: Fit, Plot, and Manipulate Distributions?
Open your series, then go to View/Descriptive Statistics & Tests/Empirical Distribution Tests...How were you able to fit the normal distribution to your data? I have a set of data, and I'm trying to see which distribution best fits it. It'd be great to at least get a starting point to work with.
Who is online
Users browsing this forum: No registered users and 1 guest
