In the following example,
PROC FCMP compiles the SIMPLE function and stores it in the
sasuser.models
data
set. Then the CMPLIB= system option is set, and the function is called
by PROC MODEL.
The output from this
example spans several pages.
proc fcmp outlib = sasuser.models.yval;
function simple(a,b,x);
y=a+b*x;
return(y);
endsub;
run;
options cmplib = sasuser.models nodate ls=80;
data a;
input y @@;
x=_n_;
datalines;
08 06 08 10 08 10
;
proc model data=a;
y=simple(a,b,x);
fit y / outest=est1 out=out1;
quit;
Compiling and Using Functions: Output 1
Compiling and Using Functions: Output 2
Compiling and Using Functions: Output 3
Compiling and Using Functions: Output 4
Compiling and Using Functions: Output 5
For information about
PROC MODEL, see the
SAS/ETS User's Guide.