Featured Post

Reference Books and material for Analytics

Website for practising R on Statistical conceptual Learning: https://statlearning.com  Reference Books & Materials: 1) Statis...

Monday, December 5, 2016

Simple question on Probability

Simple question on Probability ---See how much you remember

                             
If you choose an answer to this question at random, what is the chance you will be correct?
 
A) 25%
B) 50%
C) 70%
D) 25%
 
Put your thoughts.




Thanks
Learner

Reference Books and material for Analytics


Website for practising R on Statistical conceptual Learning:

https://statlearning.com 



Reference Books & Materials:


1) Statistics by David Freedman
  •   Observational Studies
  •   Basic concepts of Hypothesis Testing

2) An Introduction to Categorical Data Analysis - Book by Alan Agresti

  •  Contingency table
  •  Chi square
  •  Correlation for Categorical data
  •  Odd ratio/Risk Ratio

3) Logistic Regression. A Self- Learning Text -Book by David Kleinbaum and M. Klein

  • Logistics Regression

4) An Introduction to Statistical Learning - Textbook by Daniela Witten, Gareth James, Robert Tibshirani, and Trevor Hastie

  • Different Non-parametric & Machine Learning Techniques
  • KNN
  • Decision Trees
  • Regression Splines
  • Cross Validation
  • Discriminant Analysis.

5) The Elements of Statistical Learning - Book by Jerome H. Friedman, Robert Tibshirani, and Trevor Hastie
  • Overview of Analytics
  • Concepts of over fitting
  •  Bias-variance Trade-off
  •  Neural Network
  •  Monte Carlo
  •  Ensemble learning

6)  Survival analysis: a self-learning text  - by Kleinbaum & Klein
Applied survival analysis: regression modeling of time to event data - by Hosmer, Lemeshow & May
  • Survival Analysis

7) Naïve Bayes classification, descriptive analysis, Introductory probability - discussion in this blog and other online materials.







Thanks
Learner

Friday, December 2, 2016

Debugging Complex Macro in SAS (Technology Specific : SAS)


Reference: SAS support website (www.support.sas.com).

Many times we have seen that a Macro is being called from another macro . And we find it difficult to debug it if the outer macro is called in loop. In fact I have seen and designed some architecture where we have to do 4 to 5 level nesting within the macro.
Usually the 3 options that is used in Macro debugging are mprint mlogic symbolgen. The MPRINT option is an essential tool when developing macros allowing you to see the SAS code generated by a macro within the log. If however one macro makes a call to another which then generates SAS code, this cannot easily be seen and recognized in the log. See below example:

http://www.amadeus.co.uk/library/images/298.jpg



SAS log generated by above code is given below,  Inner macro is printed but difficult to understand the nesting

Log without MPRINTNEST:

http://www.amadeus.co.uk/library/images/299.jpg


Submitting the same macro a second time but with the MPRINTNEST option included as well as the MPRINT option provides details of the macro nesting in the log.

http://www.amadeus.co.uk/library/images/300.jpg



Log with MPRINTNEST:http://www.amadeus.co.uk/library/images/301.jpg


  


It is now clear to see that the second macro call is nested within the first, and if further nested call are made this will also be displayed in the same format (macro name separated by dots).


At the end, let me leave you with below exercise on macro variables. What will be the output ?
%LET A=7 ; %LET B=&A+2;
 %LET C=%EVAL(&A+2);
%LET D=%EVAL (&A+4.2);
%PUT &A &B &C &D;