Hello,
I apply the Generalized Additive Models to this model : money = year + job
my response variable is continuous (money) and the other variable is not continuous (job). This is what I did with SAS :
proc gam data=mydata;
model money = spline(year) spline(job);
output out=estimates p;
run;
But I got this error :
ERROR: Variable JOB in list does not match type prescribed for this list.
How can I fix it ?
If JOB is not contnuous (it's a character variable), you can't fit a spline through it. That is a meaningless idea.
"the other variable is not continuous (job)."
Is it character variable ? Put them in CLASS statement.
Also try PROC ADAPITIVE + CLASS .
Yes, Job is a character variable (Credit Analyst, Treasurer, Secretary, ect.).
I edited my SAS code like this
proc gam data=mydata;
class job;
model money = spline(year) spline(job);
output out=estimates p;
run;
I always got this error :
ERROR: Variable JOB in list does not match type prescribed for this list.
ERROR: A MODEL statement is required.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE GAM used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
What is PROC ADAPITIVE + CLASS ?
If JOB is not contnuous (it's a character variable), you can't fit a spline through it. That is a meaningless idea.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.