Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Fuction Fden Help


From   Alan Neustadtl <[email protected]>
To   [email protected]
Subject   Re: st: Fuction Fden Help
Date   Mon, 5 Mar 2012 13:11:38 -0500

Is this what you are looking for?

Best,
Alan

/* Stata code begins */
#delimit ;
graph twoway (function y=Fden( 3,10,x), range(0 4) lw(thick))
             (function y=Fden(10,10,x), range(0 4) lw(thick))
             (function y=Fden(40,40,x), range(0 4) lw(thick)),
  title("F-Distribution with Different Degrees of Freedom")
  xtitle("F", size(medlarge)) ytitle("")
  xlabel(none) ylabel(none)
  xscale(lw(medthick)) yscale(lw(medthick))
  legend(off)
  graphregion(fcolor(white));
#delimit cr
/* Stata code ends */


On Mon, Mar 5, 2012 at 1:05 PM, Bryan Griffin
<[email protected]> wrote:
> Hi --
>
> I would like to create a plot showing density of F distribution for various
> degrees of freedom, but I'm having difficulty getting this to work. I was
> not able to find an example for the F distribution in the archives or on
> the net, but I found this example which works well for the normal
> distribution:
>
> graph twoway function normden(x, 0, 1) , range(-5 5)
>
> So using that as an example, I tried a number of variations of this
>
> twoway function Fden(3,20,1)
>
> No matter what numbers I place within the Fden() function the returned
> graph is a flat line.
>
> I also tried specifying a range, like this
>
> twoway function Fden(3,20,1), range(.1 100)
>
> but, again, no matter which numbers I try the graph returns a flat line.
>
> Any suggestions?
>
> Thanks,
> Bryan
>
> P.S. Here's the Function help information:
>
> Title
>
>  [D] functions -- Functions
>
>
> Probability density function
>
>  Fden(n1,n2,f)
>     Domain n1:    1e-323 to 8e+307 (may be nonintegral)
>     Domain n2:    1e-323 to 8e+307 (may be nonintegral)
>     Domain f:     -8e+307 to 8e+307
>                   Interesting domain is f > 0
>     Range:        0 to 8e+307
>     Description:  returns the probability density function for the F
> distribution with n1 numerator and n2 denominator degrees of freedom.
> returns 0 if f < 0.
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index