Hello,
I am currently working on daily returns of several different REITs and I have a problem when I run my panel regression, it keeps showing the same error message :
here is my code :
proc sort data=thesis.diversified_returns out=thesis.diversified_returns;
by company date;
run;
proc panel data=thesis.diversified_returns;
id company date;
model log_return=log_growth_in_cases log_AT log_FFO log_CASSET log_MVASSET/
fixtwo;
run;
here is an overview of my database:
Hello @Am_fr ,
Here's the code :
( Remark that PROC TIMESERIES is making the timestamp equally spaced, i.e. it fills gaps (with missings when using setmissing=missing) )
proc sort data=work.have
/* no out= needed if input and output datasets are the same */ ;
by cross_section timestamp;
run;
proc timeseries data=work.have out=work.dseries;
by cross_section;
id timestamp interval=day
accumulate=median
setmiss=missing
/* start='01jan1998'd */
/* end ='31dec2000'd */ ;
var item1-item8;
run;
/* end of program */
If it works now, you might want to use another accumulation statistic.
See here for your choices :
SAS/ETS 15.2 User's Guide
The TIMESERIES Procedure
ID Statement
Look for the ACCUMULATE=option !
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/etsug/etsug_timeseries_syntax08.htm
Cheers,
Koen
From now on, please, when an ERROR appears in the log, show us the ENTIRE log for that PROC or DATA step, not just a few lines.
The current time period has date=31DEC2014 and the previous time period has date=31DEC2014
I'm not really a heavy user of PROC PANEL, but I don't think two observations with the exact same date are allowed.
Plz post it at Forecasting Forum:
PROC PANEL is under SAS/ETS
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/bd-p/forecasting_econometrics
Hello,
You have duplicate dates within the same cross-section.
Might be a data quality problem.
If not, you can de-duplicate by taking the median (or whatever summary statistic) per cross-section (like company , firm, country , subject_id , ...) for the same dates.
You can do the latter using :
It's pretty easy, but let us know if you need an example !
Cheers,
Koen
thank you for your answer !!
but i believe I really don't have duplicate dates within the same cross-section.
when It is ordered by company name and date, the first lines of my table are these ones (where i don't see any duplicate) :
Hello @Am_fr ,
Here's the code :
( Remark that PROC TIMESERIES is making the timestamp equally spaced, i.e. it fills gaps (with missings when using setmissing=missing) )
proc sort data=work.have
/* no out= needed if input and output datasets are the same */ ;
by cross_section timestamp;
run;
proc timeseries data=work.have out=work.dseries;
by cross_section;
id timestamp interval=day
accumulate=median
setmiss=missing
/* start='01jan1998'd */
/* end ='31dec2000'd */ ;
var item1-item8;
run;
/* end of program */
If it works now, you might want to use another accumulation statistic.
See here for your choices :
SAS/ETS 15.2 User's Guide
The TIMESERIES Procedure
ID Statement
Look for the ACCUMULATE=option !
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/etsug/etsug_timeseries_syntax08.htm
Cheers,
Koen
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.