When I run the following code, I do not get the "parameterestimates" table. Instead, it gives the following warnings:
WARNING: Output 'ParameterEstimates' was not created. Make sure that the output object name, label,
or path is spelled correctly. Also, verify that the appropriate procedure options are used
to produce the requested output object. For example, verify that the NOPRINT option is not
used.
WARNING: Output 'SplineKnots' was not created. Make sure that the output object name, label, or path
is spelled correctly. Also, verify that the appropriate procedure options are used to
produce the requested output object. For example, verify that the NOPRINT option is not
used.
WARNING: Output 'ParameterEstimates' was not created. Make sure that the output object name, label,
or path is spelled correctly. Also, verify that the appropriate procedure options are used
to produce the requested output object. For example, verify that the NOPRINT option is not
used.
Here are my code. Any help please?
proc surveyreg data=zinc.imputed_srtd;;
weight nat_weight_bio;
cluster psu_no_ov;
strata newstrata;
class sex area edu_mt p_activity cat_crp;
format edu_mt edu. CAT_CRP CRP. AREA AREA.;
effect znspln = spline(zns_unic / naturalcubic basis=tpf(noint) knotmethod=PERCENTILELIST(5 27.5 50 72.5 95));
model mean_dbp = znspln age_in_yr sex area edu_mt p_activity cat_crp;
OUTPUT OUT=ZINC.RESIDUALS P=P_HAT L=LOWER U=UPPER;
ods select ParameterEstimates SplineKnots;
ods output ParameterEstimates=zinc.PE;
run;
I think the documentation for SURVEYREG is clear, you need the SOLUTION option to the MODEL statement in order to get the parameterestimates output to a data set.
I'm not sure why you are not getting the SPLINEKNOTS output as well. If you run your PROC SURVEYREG, does the spline knots get written to the output? If so, try this
ods trace on;
proc surveyreg;
/* Other surveyreg commands go here */
run;
ods trace off;
The name of the tables are written to the log, one of them should be the SPLINEKNOTS table.
You don't say why you want this information in output data sets. This is a common failing here in the forums, some people don't tell us WHY they want code to do something. Knowing why, we can often find a better solution. So I'm going to guess — do you want this information so you can predict new observations at some later time? If so, you want to use the STORE statement in PROC SURVEYREG and then use PROC PLM to predict new observations at a later time.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: