10-14-2016 04:22 PM
I am trying to analyze a 2-way factorial RCBD using ANOVA. I have set a PROC IMPORT command from an excel file. One of the variables is Gas, of which Methane, Nitrous Oxide and Carbon Dioxide are options. I want to analyze the data by gas. I wanted to look at Methane first, so, folowing after the PROC IMPORT command i inserted:
This is followed by PROC SORT, PROC PRINT, and PROC ANOVA commands. Although the Log does not show any errors, the prinout does not include any statistical results just the input data. The log gives one comment in blue: "NOTE: Variable Methane is uninitialized." and anotoher in green: "WARNING: Data set WORK.JUL14_1 was not replaced because new file is incomplete."
How do i properly use a command for SAS to only analyze the methane data from the imported excel file?
10-14-2016 04:30 PM
The error is here, SAS is looking for a variable Methane. If you're trying to specify a string, you enclose it in quotation marks.
"NOTE: Variable Methane is uninitialized."
You can also implement the filter directly in your proc using a WHERE clause.
Also, if you're going to do the same analysis for all gas types use a BY variable instead of filtering and running for each type.