Date: Fri, 7 Jul 2006 10:42:28 -0700
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Subject: Re: DIAG function
Content-Type: text/plain; charset="iso-8859-1"
The diag function belongs to SAS/IML package. It cannot be used in data
Here is an example in SAS/IML. IML package needs a separate license.
print a b;
1 2 1 0
3 4 0 4
For regression analysis you may take a look of all canned regression
procedures in SAS/STAT. They should fit most of regression analyses.
> Hi all,
> I was wondering if anyone has worked with the DIAG function in SAS. I'm
> trying to get the the diagonal elements for these variables: COST1
> COST2 which I intend to use to do regression modeling on to find
> lambda. (Not sure about the econometrics but that's what my professor
> suggested I do for my project...forgive me if my question isn't very
> clear.) My cost1 and cost2 variables each have about 14,000
> COST1 and COST2 are coded as Numbers (with 2 decimal places). When I
> try to define diag_cost1= diag(cost1) I get an error: "The function
> DIAG is unknown or cannot be accessed". Checked SAS Help and it's a
> function, but I don't know how to get it to work.
> Any ideas? Thanks!!!!!