12-06-2016 11:35 PM
I need to take an average of samples1 to 10 for respective treatment and replication and then would like to create a new variable of a treatment average (I have already sorted the data for replications and treatments). How can I achieve this by SAS coding, please?. It looks straight forward in excel but I am new to SAS and would like to learn it. Thank you in advance.
|Replication (1-3)||Treatment (1-18)||Sample1-10|
12-07-2016 12:02 AM
Do you have ten variables, Sample1-Sample10 that you need an average for each line? Or are you calculating the average using data from multiple rows?
If 10 variables
If multiple rows
It also depends on what you want for output, which you haven't specified.
12-07-2016 10:35 AM
12-07-2016 10:43 AM
Data transfomations can generally only be done in a DATA step or PROC SQL. DefinitelyNOT in a proc sort.
SAS is a procedure-oriented tool (some call it a language).
Then read something like "The Little SAS Book" to get the basics. (and run some SAS tutorials.).