五千年(敝帚自珍)

主题:葫芦僧乱判葫芦案 -- 煮酒正熟

共:💬133 🌺93
全看分页树展 · 主题 跟帖
家园 the other thing is

It's really not something special, it's pretty much the same stuff that people in the whole industry are doing. If you challenge one specific analyst in our company that's fine. But since this is something really common in our industry, you're actually challenging all the statistics experts, and that' where I find a bit unaccetable.

By the way, just did a quick check and found that Levene test is for checking the equal variance assumption.

http://www.itl.nist.gov/div898/handbook/eda/section3/eda35a.htm

The macro for levene test.

/*************************************************************************/

/* This macro tests the Equality of Variances for a Response Variable */

/* using the Levene Test and is available for use on the ASU's */

/* Research/Statistics UNIX cluster. */

/* */

/* The following SAS macro takes as input: */

/* - the name of a Classification or Grouping Variable */

/* - the name of the Dependent Variable to be analyzed */

/* - the name of the SAS Data Set containing the above two variables */

/* */

/* It uses SAS PROC GLM to perform Levene's Test for Homoscedasticity. */

/* */

/* References: */

/* Madansky, Albert, Prescriptions for Working Statisticians, 1988, */

/* New York: Springer-Verlag. */

/* Miller, Rupert G., Jr., Beyond ANOVA, Basics of Applied Statistics,*/

/* 1986, New York: Wiley. */

/* */

/* Example of a statement to call the macro below: */

/* %LEVENE(gp_varname,dp_varname,ds_name); */

/* where */

/* gp_varname is the name of the grouping variable to be tested, */

/* dp_varname is the name of the dependent variable to be tested */

/* for homoscedasticity, */

/* ds_name is the SAS data set name given in the DATA step. */

/* */

/* The MACRO can be called in your SAS program as indicated below: */

/* */

/* OPTIONS SAS_system_options; */

/* DATA ds_name; */

/* INPUT gp_varname, dp_varname; */

/* (rest of your SAS statements) */

/* . */

/* . */

/* RUN; */

/* TITLE "Your choice of title"; */

/* %LEVENE(gp_varname,dp_varname,ds_name); */

/*************************************************************************/

OPTIONS NONOTES NOSOURCE NOSOURCE2; /* suppress usual echoing, and */;

OPTIONS ERRORABEND; /* abort job if the macro fails */;

%Macro Levene(Gp_var,Dp_var,DSet);

Proc GLM Data=&DSet;

Class &Gp_var;

Model &Dp_var=&Gp_var;

Means &Gp_var/HOVTest;

ODS select HOVFTest;

Run;

Quit;

%Mend Levene;

全看分页树展 · 主题 跟帖


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河