Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

How to Export Logits in Enterprise Miner

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 75
Accepted Solution

How to Export Logits in Enterprise Miner


Hello,

I am using the utility bode for custom code in EM to export a scored data set form a process flow. The variables that i get from the best model (logist regression) are ok (e.g. probabilities of primary and secondary event, predicted target etc) but i don;t get the logit (log odds) from the regression model. How can i get this variable also?

Thnaks in adavnce,

Andreas


Accepted Solutions
Solution
‎03-21-2013 07:14 PM
Frequent Contributor
Posts: 75

Re: How to Export Logits in Enterprise Miner

Posted in reply to adjgiulio

Thanks for your answer. This can be a solution but there must be an option to produce automatically the logits. EM produces so much output that i cannot imagine that it can;t produce the logits. I hope someone can answer. A turnaround that i just thought is to produce the log odds (logits) using the sas code node in the utility tab. Since the probability of the primary event is reported i guess we can produce it by a data step using an assignment statement to produce log(prob_b1/(1-prob_b1)). The expression can be assigned to a variable called logit.

Let us see if the automatic way is done!

Thnaks again 

View solution in original post


All Replies
Occasional Contributor
Posts: 17

Re: How to Export Logits in Enterprise Miner

Posted in reply to andreas_zaras

I'm interested in seeing if someone can answer your questions. I've looked into this same question myself not long ago. A logistic regression in EM is run through PROC DMREG. When you look at DMREG's documentation it doesn't say anything about an option to export coeffiecients. The workaround I found, which is no good if you need an automated solution but worked for what I had to do that one time, is the following:

-go to the results of your regression.

-by default EM shows an Effect Plots chart. Highlight that chart.

-now go to View->Table. This will open up a table that has a few pieces of information on your inputs, including their coefficients which you can use to calculate odds.

-you can now select all the data in the table and paste it in Excel, or you can save the table as a SAS table (File->Save as, after having highlighted the table)

G

Solution
‎03-21-2013 07:14 PM
Frequent Contributor
Posts: 75

Re: How to Export Logits in Enterprise Miner

Posted in reply to adjgiulio

Thanks for your answer. This can be a solution but there must be an option to produce automatically the logits. EM produces so much output that i cannot imagine that it can;t produce the logits. I hope someone can answer. A turnaround that i just thought is to produce the log odds (logits) using the sas code node in the utility tab. Since the probability of the primary event is reported i guess we can produce it by a data step using an assignment statement to produce log(prob_b1/(1-prob_b1)). The expression can be assigned to a variable called logit.

Let us see if the automatic way is done!

Thnaks again 

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 278 views
  • 3 likes
  • 2 in conversation