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
Dealing with missing values in 2SLS regression - in instrumental variablesHi I am about to make a 2SLS regression. This is a corrected IV model where I have som instrumental…
How to make a graph with confident intervals?Dear all, I would like to make a graph of several concentration indices and their confident interva…
Summing z scores in a new combined standardized variable stataI have data with anthropometics (e.g. weight, height, waist cercumference...) and blood samples (e.g…
catplot - how to control the gap between bars when 3 variables are usedThis post is about the package catplot, contributed by Nick Cox. The help file shows an example illu…
Graph with discontinuityGood evening! I have a problem with plotting a graph with discontinuity. I have the following code, …
Subscribe to:
Post Comments (Atom)
0 Response to Faults and Hiccups in the program
Post a Comment