Hi,
I am new to Stata and have been trying to plot the standard deviation of my whole sample and that of one subgroup.
This is my code:
bysort year: egen y_sd=sd(y)
by year: egen y_sd_EU15=sd(y) if EU15==1
label var y_sd "Standard deviation of real GDP per capita"
label var y_sd_EU6 "Standard deviation of real GDP per capita - EU15"
tsline y_sd y_sd_EU15 if year>=1995, xlabel (1995(10)2018)
After the bysort command "type mismatch" pops up.
Could someone please help?
Kat
Related Posts with Trouble plotting standard deviation - Sigma convergence
Endogeneity test for conditional logistic regressionHi, I'm trying to do a Hausman test for checking endogeneity. I have cross sectional data with a ma…
generating variable based on average at state-industry combination leaving one particular firm in each cellDear all, I am working with firm level data where I want to generate a variable at the firm level wh…
How to drop duplicate observations within two different variables?Hello everyone, I know that it is possible in Stata to drop duplicates. My problem is that I have t…
Change observations valuesHello, I recently started using STATA however I have a datset with approximately 7 million observati…
Different result with Abrigo and Love (2015)Hi all, I used Abrigo and Love (2015)'s pvar package available from the Stata Journal and repeat the…
Subscribe to:
Post Comments (Atom)
0 Response to Trouble plotting standard deviation - Sigma convergence
Post a Comment