Quote in French (sorry)
9 September 2011
“C’est dommage, parce que je suis dans les statistiques et il n’y a rien de plus mauvais pour la solitude”
Romain Gary
Shift…
9 September 2011
Since September first, even if the Master’s degree isn’t completely done yet, I’ve started a PhD in statistics (as well as a teaching assistant position).
This means that I will use R(!) only.
This also means that probably no more SAS macro will be written and published here.
Good bye SAS, I’ll miss you…
SAS Macro: rename all variables in a data set
16 March 2011
Here is a SAS Macro to rename all variables in a data set. This macro was adapted from WENSUI’S BLOG IN STATISTICAL COMPUTING.
You can add a prefix, a suffix or both to variable names and you can either keep the same data set with the new variable names or create a new one.
Download: SAS Macro Rename 3.0.sas
Any improvement of this macro is very welcome.
How to use Rename macro:
%Rename(
Dataset : name of the data set
Out= : name of the new data set; if left blank no new data set is created
Prefix= : string that is added as prefix; if left bank, no prefix is added
Suffix= : string that is added as sufffix; if left bank, no suffix is added
If you have any problems to upload or to open it, send me an email.
Quote?
31 December 2010
Research is a demanding mistress.
Obvious!
29 October 2010
While writing a mathematical statement on the blackboard, the famous professor G. H. Hardy said, ‘This is obvious that…’. He stopped, looked at the blackboard, thought about it for a moment. Then he retired from the lecture room and went to his office. Twenty minutes later he returned and continued writing the statement saying, ‘Yes, it’s obvious.’
One more quote…
22 July 2010
As far as the laws of mathematics refer to reality, they are not certain, as far as they are certain, they do not refer to reality.
Einstein
Metaphor
1 July 2010
Most language, especially abstract language, is not litteral but metaphorical (p.66)
S.A. Mulaik (2001): Objectivity and other metaphors of strucrural equation modeling. In: DuToit S., Cudeck R., Sorbom D. (Eds), Structural Equation Modeling: Present and Future. Scientific Software International Inc., Lincolnwood, IL, pp. 59-78.
Lippmann and/or Poincaré
28 April 2010
Everyone believes in the [normal] law of errors, the experimenters because they think it is a mathematical theorem, the mathematicians because they think it is an experimental fact.
SAS Macro: Yule Kappa
22 December 2009
Here is a macro for SAS that computes two measures of agreement, Cohen’s Kappa (Cohen, 1960) and Yule’s Y (Yule, 1912).
This macro is usefull, first because SAS doesn’t provide Yule’s Y (only Yule’s Q), and Yule’s Y is supposed to overcome the base rate problem of the Kappa statistic, i.e. when the base rate is less than 10% (Spitznagel & Helzer, 1985) and second because when the 2×2 contigency table has an empty cell, a pseudo-bayesian estimator (Bishop & all, 1975, pp. 408-410) is computed in order to obtain nonetheless the two measures of agreement (otherwise, they are not calculated).
Any improvement of this macro is very welcome.
How to use Yule_Kappa macro:
%Yule_Kappa(
data = name of the data set or sample
var1 = first variable or gold standard
var2 = second variable
weight = in case of weighted data
alpha = significance level. If you leave it blank, it provides the 95% C.I.
Download: MACRO Yule_Kappa 3.1.sas
If you have any problems to upload or to open it, send me an email.
References
Y. M. Bishop, S. E. Fienberg, P. W. Holland (1975) Discrete Multivariate Analysis: Theory and Practice. Cambridge, MA: MIT Press.
J. Cohen (1960). A coefficient of agreement for nominal scales. Educational and Psychological Measurement, 20(1): 37–46.
E. L. Spitznagel, J. E. Helzer (1985). A proposed solution to the base rate problem in the kappa statistic. Archives of General Psychiatry. 42: 725–728.
G. U. Yule (1912). On the methods of measuring association between two attributes. Journal of the Royal Statistical Society. 75(6):579–642. Link
What this blog is about?
4 August 2009
I have written a SAS macro that I would like to share, because it’s maybe useful, and not only for myself…
Then I thought that I could create a blog in the case I would write more “interesting” macros, or everything related to statistics…
So, here it is!