A second point in the recent Nature Human Behavior editorial https://t.co/nq8hLR5RRg is to adhere to threshold interpretations. Do not use ‘marginally significant’. A finding is significant, or not. But why would scientists make dichotomous claims?
A #StataTip: If you are repeatedly using the same set of commands, for example for graphs or regressions, then:
1) start using macros, and/or
2) define small programs
This saves you:
(a) space, and
(b) the hassle of copy/pasting
and looks neater!
Want to clean up your @Stata data more efficiently (& carefully)?
Generating, recoding, & rescaling variables is a crucially important part of data analysis--yet it's hard to find a succinct guide. I've created one for my students & thought I'd share!😁
https://t.co/qCsBkzBIeZ
#MethodMonday 2: This week I'm sharing @statsepi s excellent post on balancing of variables in RCTs https://t.co/Sl5fLwGoSw
A common misconception is that we randomise to 'balance' baseline variables (incorrectly termed confounders) - we don't 1/..
Want to have nicer scatterplots in @Stata?
Students often ask me how to adjust individual labels & clean up overlapping/cluttered labels. So, I finally decided to make a guide w/ every possible fix that I'm aware of:
https://t.co/GFebv17BaG
Hope it's helpful for you!🙂
We have updated our Stata Graph Gallery. Now over 160 graphs! New features include: search across all the graphs, select by complexity, or select by graph type. Check it out at https://t.co/5qFB320qbn
Quick @Stata tip (ICYMI):
keep if inlist(state, "AL", "AK", "AZ")
is the same as:
keep if state=="AL" | state=="AK" | state=="AZ"
And:
keep if inrange(distance, 10, 91)
is the same as:
keep if distance>=10 & distance<=91
No matter what you were taught,
don't bother to test for proportional hazards
in survival analyses.
Hazards are never proportional because hazard ratios vary over the follow-up if treatment has an effect on survival.
@mats_julius and I explain it here:
https://t.co/hlRstEmPse
Quick @Stata tip: get rid of the leading and trailing space of a string variable with "trim":
clear all
input str12 str
"String A "
" String B "
" String C"
end
replace str = trim(str)
compress
Quick @Stata tip: when using bysort, say you have a variable you want to sort with, but *not* group by. Put this variable in parentheses:
sysuse census, clear
*keep least-populous state within each region, so sort by pop within each region:
bys region (pop): keep if _n==1
Were you able to foretell this? Serpent Moon Giveaway for our Prescient Night DLC! 🔮
For every 100 Retweets, we are giving away another Steam DLC key. ���️
To enter the giveaway all you have to do is:
- Follow us on Twitter✔️
- Like this Post ✔️
- Retweet this Post 🔁