Prev: ETS Time Series log messages
Next: Expand Results Tree
From: Debra Lopez on 8 Jul 2010 14:01 Hi All, Can somebody explain me the difference between functions and PROCs that calculate the same simple descriptive statistics? Thanks
From: Ya on 8 Jul 2010 14:11 On Jul 8, 11:01 am, Debra Lopez <debralope...(a)gmail.com> wrote: > Hi All, > > Can somebody explain me the difference between functions and PROCs > that calculate the same simple descriptive statistics? > > Thanks procs is used to calculate the descriptive statistics against the values in one variable, so the data is vertical. function, on the other hand, is used to calculated against values of a group of variables, so the data is horizontal. HTH Ya
From: Andrew Karp Sierra Info Services on 8 Jul 2010 14:54 Let me try to answer this another way: Analytical procedures work on the variables (or 'columns') in a data set and SAS functions are used in a Data Step to operate on the observations (or 'rows') in the file, one at a time. Here is a quick example. Suppose you had a data set with test data from ten students. For each student you have four test scores, SCORE1, SCORE2, etc... If you wanted to find the average (mean) for each of the four scores for all ten students, you would likely use PROC MEANS or SUMARRY or UNIVARIATE to have SAS compute "work down the columns" to calculate the mean of each of the four scores. On the other hand, if you wanted to calculate the mean score for each STUDENT, you would likely use the MEAN programming language function to have SAS calculate the average (mean) score for each student and assign that value to a new column/variable in the data set. Hope this helps.... Andrew Karp Sierra Information Services http://www.sierrainformation.com On Jul 8, 11:11 am, Ya <huang8...(a)gmail.com> wrote: > On Jul 8, 11:01 am, Debra Lopez <debralope...(a)gmail.com> wrote: > > > Hi All, > > > Can somebody explain me the difference between functions and PROCs > > that calculate the same simple descriptive statistics? > > > Thanks > > procs is used to calculate the descriptive statistics against the > values in one variable, so the data is vertical. > function, on the other hand, is used to calculated against values of a > group of variables, so the data is horizontal. > > HTH > > Ya
|
Pages: 1 Prev: ETS Time Series log messages Next: Expand Results Tree |