Date: Thu, 23 May 1996 14:00:55 +0100
Reply-To: David Garbutt +41 61 68 80875 <DAVID.GARBUTT@ROCHE.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: David Garbutt +41 61 68 80875 <DAVID.GARBUTT@ROCHE.COM>
Subject: Re: Monte Carlo Macros
Hans-Peter Piepho asked:
--> I am planning to write a macro which involves Monte Carlo
methods and thus
--> is quite computing intensive. Also, I need to call PROC GLM at
different stages.
-->
--> In principle, the Monte Carlo part can be done in repeated data
steps
--> combined with calls of PROCs. An alternative is IML. It seems to
me that the
--> latter is usually faster, but I am not sure/have no experience.
The
--> advantage of a non-IML macro is, of course, that it can be used
on
--> installations, which do not have the IML module.
-->
--> My question may be too general for a simple answer, but anyway,
here goes:
--> Should I use IML with the type of macro I tried to describe, or
are repeated
--> data steps equally worthwhile?
Hi,
I have done tasks that sound similar to what you are tackling.
As a general response I would say, if you have IML use it.
It will be _much_ faster than data steps + procs + macros.
The facilities in IML are very powerful ( example, you can write IML
code into a matrix and then execute it, which means you can build
the code up within IML without using macro at all).
IML has all the bits you need to do GLMs (you can even write code to
do Generalised linear models in it).
ALSO, relating to another posting, IML has a function to create
dummy variables ( and design matrices). This is the only _simple_
way_ in SAS that I know to do this.
You will also be able to program graphic displays of your simulation
results using the IML interactive grahics primitives if you run your
programs on a graphics device.
Don't do this if:
1) your grasp of matrix algebra is not good enough to deal with that
formulation of GLMs
2) IML has to keep everything in memory and this could be a _big_
problem depending on the size of your problem and other resources
available.
3) It is an absolute requirement that it will run at non-IML sites.
4) you can't be bothered to read the (fairly thick) manual and put
some effort into learning IML.
If you decide to use procs etc then compile all your datasteps and
do as much as possible using data sets rather than macrovariables.
You might want to do both as a way of verifying your IML code
anyway, then you can evaluate the speed properly.
I hope this helps, general though it is!
Good Luck
_______________________________
Dave Garbutt
Friedrichstrasse 29, D - 79618 Rheinfelden, Germany.
david.garbutt@roche.com
_______________________________