Aptech Systems, Inc. Worldwide Headquarters
Aptech Systems, Inc.
2350 East Germann Road, Suite #21
Chandler, AZ 85286
Ready to Get Started?
For Pricing and Distribution
Training & Events
Step-by-step, informative lessons for those who want to dive into GAUSS and achieve their goals, fast.
Have a Specific Question?
Q&A: Register and Login
Premier Support and Platinum Premier Support are annually renewable membership programs that provide you with important benefits including technical support, product maintenance, and substantial cost-saving features for your GAUSS System or the GAUSS Engine.
Join our community to see why our users are considered some of the most active and helpful in the industry!
Where to Buy
Available across the globe, you can have access to GAUSS no matter where you are.
Recent Tagsapplications character vectors CML CMLMT Constrained Optimization datasets dates dlibrary dllcall error error codes errors Excel FANPACMT file i/o floating network GAUSS Engine GAUSSplot graphics GUI hotkeys installation Java API libraries license licensing linux loading data loops matrices matrix manipulation Maxlik MaxLikMT operators optimization Optmum PQG graphics procs random numbers string functions strings structures threading Time Series writing data
Time Series 2.0 MT
Find out more now
Time Series MT 2.1
Simulating from a t distribution
Maybe this is a silly question but I am trying to get simulations from a t distribution and cant find it. Any help?
The simplest way to accomplish this is by using the student-t inverse cdf to transform random uniform numbers like this:
proc (1) = rndT(rw, cl, df); retp(cdftci(rndu(rw, cl), df)); endp;
You can test that the distribution of your numbers is correct by checking to see what percentage of your numbers are less than a certain value and then comparing that with the T-CDF function:
rw = 1e5; cl = 1; df = 5; r = rndT(rw, cl, df); checkVal = 0.37; comp = cdftc( checkVal, df); //Since cdftc returns the compliment subtract 1 print (1 - comp); print (sumc(r .<= checkVal))/rw; proc (1) = rndT(rw, cl, df); retp(cdftci(rndu(rw, cl), df)); endp;
You can copy and paste the code snippet above to check. With a ‘checkVal’ of 0.37 both print statements should be about 0.636. You can change ‘checkVal’ to test other points.
I think there may be a faster method to make the random deviates in terms of the function rndGamma. But, I don’t know it off the top of my head.
Thanks a lot. Basically my problem started because if you search in the help for this command that you showed me now “rndT”, is non existent.
It would be good to include it I believe.
Sorry, my mistake, this is a function you are creating yourself. Please, disregard my last answer.