I was plotting the simplest of histograms (observations by year) in Stata 14 and finding that the histogram plot was lumping the last year (2016) into the next-to-last year (2015). For example, the following code generates the tabulation and histogram below. What is going on here?
clear all
set obs 200
set seed 10
gen year = floor(runiform(2010,2017))
tab year
histogram year, start(2010) width(1)
Array
Array
Related Posts with Histogram misbehaving
Panel VAR Diagnostics / Assumptions.Greetings Statalist Users and team. I'm working on a panel data VAR model using pvar package. Where…
Creating Tables by LoopsHello, I am trying create a table with 4 columns and 7 rows by using a for loop. Could anyone help m…
"Subtracting" one string variable from another string variableI'm cleaning up a government dataset that I need some help on. For the sake of simplicity, let's say…
is it possible to create a new variable with otherwise/else function?Hi All, I am trying t create a new variable that defines Car owned status of a person. What I want i…
keeping soundex started with a specific letterI have a dataset and want to keep a number of variables - Soundex started with a letter, for example…
Subscribe to:
Post Comments (Atom)
0 Response to Histogram misbehaving
Post a Comment