Hello All,
I was trying to see the climate data (temperature) trend over time for combined sites. I have load the data using the command and it was successful. However, when I tried to model it with the command than an error occurred. It said ERROR: File WORK.YEAR.DATA does not exist. Can you please help me to solve the problem? Thanks.
/** Import an XLSX file. **/
PROC IMPORT DATAFILE="/folders/myfolders/analysisi/temp.xlsx"
OUT=WORK.cc
DBMS=XLSX
REPLACE;
RUN;
/** Print the results. **/
PROC PRINT DATA=WORK.cc; RUN;
proc mixed data=year;
temp plot;
model year = temp plot temp*plot;
run;
Hi,
In the proc import code you create a dataset in the library WORK, called CC. You then print the dataset WORK.CC. You then attempt to run a proc mixed on a dataset WORK.YEAR. At no point in the code you have given is a dataset WORK.YEAR created, mayeb you meant to put WORK.CC in there.
Hi,
In the proc import code you create a dataset in the library WORK, called CC. You then print the dataset WORK.CC. You then attempt to run a proc mixed on a dataset WORK.YEAR. At no point in the code you have given is a dataset WORK.YEAR created, mayeb you meant to put WORK.CC in there.
Thanks for your reply. In that case, the code looks like proc mixed data= WORK.cc;
temp plot;
model year = temp plot temp*plot;
run;
Actually WORK.cc is the spreedsheet name. Than what would be my proper code for proc mixed. Here year is the dependent variable. Can you please help to write the proper code. Sorry for asking so many questions. I am very new in SAS. Thanks
Not sure I follow, the spreadsheet is called
"/folders/myfolders/analysisi/temp.xlsx"
From that you create a SAS dataset in WORK called CC with the line:
OUT=WORK.cc
So your correction to the proc should work:
proc mixed data= WORK.cc;
temp plot;
model year = temp plot temp*plot;
run;
However, as you are importing from Excel using a guessing procedure, it is left up to SAS to decide what to call the columns and what lengths on the CC dataset created. These may come from the column headings in your Excel file, they may be different. You need to look at the attributes of the dataset CC -> you can right click on the dataset in SAS explorer and select properties. Ensure you have a variable called year. As for the model itself, thats really up for you to decide if its the right model for your purpose.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.