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
est the sensitivity - stochastic frontier [COLOR=rgba(0, 0, 0, 0.87)]Good afternoon, I'm running a stochastic frontier model and I need to te…
Simple linear regression: difference of results in Stata when compared to Excel (why?)I performed a simple linear regression in Stata and in Excel by relating the number of hotel arrival…
Command for Calculating the Average for 7 days periods in Panel DataDear Stata Specialists, I have a daily panel data from 01/01/2012 to 12/31/2017 with 10 different r…
Multicollinearity - Lagged Independent VariableI am assessing the impact of economic sanctions on the five major components of GDP (imports, export…
Sudden r(608) error in a loop (file cannot be modified)Hello, I have encountered a strange problem (at least for me). I run a loop of the following form t…
Subscribe to:
Post Comments (Atom)
0 Response to Faults and Hiccups in the program
Post a Comment