hello i have a code which when I running, it doesn't work. I cannot troubleshoot the errors.
proc freq data=temp;
table type_weather;
run;
data =temp;
set temperature;
if type_weather <= 3 then precipitation ='dry';
else precipitation = 'wet' ;
run;
proc print data=temp;
var precipitation type_weather;
run;
proc freq data=temp;
tables modiness * type_weather / expected chisq;
run;
Doesn't work is awful vague.
Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.
No output? Post any log in a code box.
Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.
The error in the forth line which is
data =temp;
just remove the (=) sign
it will be data temp;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.