Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SAS - replicating Excel formula with Lognormal Distribution

Status
Not open for further replies.

IB1979

Programmer
Jun 15, 2009
1
GB
I am attempting to replicate the following excel formula in SAS:

=min(2.2(lognormal(variable)-ALFA)/BETA)

I have set up the ALFA and BETA in SAS by:

%LET ALFA = value entered
%LET BETA = value entered

I am struggling to code this in SAS as part of a data step, can anyone help??

Thanks

IB1979
 
There are whole bunch of LOG functions in SAS. I guess you have to know which type of LOG you need. SEE the SAS help for more info on the many functions.

To me a normal dist log could be either base 2 or 10. For this you can use the LOG10(varX) or LOG2(varX) functions.

In your case I would re-evaluate the whole picture before deciding on either one of these functions.

The reason I would re-evaluate the whole picture is the complex algorithm created in the excel app had a purpose and if the goal was to get to a certain point perhaps there is an easier/shorter way to get to that final point. Using the many PROCS that SAS offers you can generate stats that may have this intermediate step built in.

When I have these type of question I see the statistician for their analysis.
Klaz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top