I am new to SAS and I need to generate report for an input data given name of care, their rating and year. The report should show average rating of car in particular year. Te data look like
car1 car2 car3 car4 car5 car6 .......car30
1990 3 2
1991 4 4 and so on....
1992 5 5
1993 6 6
1994 4 7
1996 6 8
1997 9 9
I need to find mean % of each car in each year. Example average of car1 in 1991 is (4-3)/4 * 100. Then add all the mean % and divide with total number gives average.
Question: do i have to define 30 variables in Var with Infile?
How to store variable or do we have array function in SAS?
car1 car2 car3 car4 car5 car6 .......car30
1990 3 2
1991 4 4 and so on....
1992 5 5
1993 6 6
1994 4 7
1996 6 8
1997 9 9
I need to find mean % of each car in each year. Example average of car1 in 1991 is (4-3)/4 * 100. Then add all the mean % and divide with total number gives average.
Question: do i have to define 30 variables in Var with Infile?
How to store variable or do we have array function in SAS?