The week code is incorrect, and the week starts on Wednesday instead of Monday, which has persisted for a long time, even after the update. The following is a very short example, which is also added to the attachments.
clear all
range Date 22159 22258 100
format %td Date
g Day=dow(Date)
g week=week(Date)
(last line to correct for the error)
replace week=week[_n+2]
As the data editor shows the week numbers change on the third day, i.e., Wednesday, rather than Monday. These hiccups in the program, which also appear elsewhere (for example there is no difference in output between a vvthin and a vvvthin line), make me question the reliability of the more important output, as regressions.
I hope someone can explain these mistakes.
Related Posts with Faults and Hiccups in the program
xtivreg with random effect and optimal sample sizeDear all, Hello! I am using panel data and I did an Instrumental Variable estimation using the -xti…
Order of layersHi! If we consider different plots in a twoway graph as layers and if we don't change the order of p…
Random selection of observations in a variableHi, I have a dataset with 1500 each for 46 countries. But I want to make a random selection of coun…
Generalized unidiff model for individual-level data available from SSCHi all, there is a new package called -udiff- available from SSC. It can be used to estimate so-cal…
Stata 16 undo redoHi all I am sorry but I have a basic issue: I just moved from a very old Stata version (Stata 11) to…
Subscribe to:
Post Comments (Atom)
0 Response to Faults and Hiccups in the program
Post a Comment