I'm trying to use a Pearson's correlation with two non-normal variables. I know that I could use non-parametric correlation models such as Spearman's, but that would make the information more difficult to interpret. Can someone help me with a simple solution to apply bootstrapping to pwcorr and pcorr functions using Stata?

  • $\begingroup$ Cross-posted at statalist.org/forums/forum/general-stata-discussion/general/… $\endgroup$ – Nick Cox Dec 15 '15 at 23:35
  • $\begingroup$ The "functions" you mention are commands in Stata terms. $\endgroup$ – Nick Cox Dec 16 '15 at 10:45
  • $\begingroup$ There is a statistical question embedded here, which is addressed by @Dimitriy in his answer and also on Statalist. But without sight of the data or clarification of the supposed problem further comment is difficult, both here and there. $\endgroup$ – Nick Cox Dec 16 '15 at 10:49

On the statistical aspects of the question, I am not sure why Spearman would be more difficult to interpret or why normality is required here exactly. You may want to reconsider those opinions. Also, it is Stata, and not STATA.

On the computational part, with two variables, you can accomplish your goal like this:

sysuse auto
pwcorr price mpg
bootstrap corr = r(rho), nodots nowarn reps(1000) seed(1921) saving("~/DESKTOP/bs_corr", replace): pwcorr price mpg
| cite | improve this answer | |
  • $\begingroup$ I edited the misspelling STATA in the original (not used by the company for 30 years; why is it a meme at all?). $\endgroup$ – Nick Cox Dec 16 '15 at 10:45
  • $\begingroup$ @NickCox, I kind of have to blame their mixed cases in the logo that spells STaTa. $\endgroup$ – Penguin_Knight Dec 16 '15 at 13:39
  • $\begingroup$ @Penguin_Knight Sure, the company kept the original logo in its idiosyncratic font; logos are often different because they are intended to be distinctive. But even a glance at the website or the documentation shows that Stata is the standard spelling. (Disclosure of interest is left tacit.) $\endgroup$ – Nick Cox Dec 16 '15 at 13:46
  • $\begingroup$ @NickCox, well having been corrected once by you as well and now trying make my students spell it correctly, I feel your pain. :) $\endgroup$ – Penguin_Knight Dec 16 '15 at 13:49
  • $\begingroup$ That's good to hear, but why do your students want to spell it incorrectly? Perhaps they see references to SPSS, SAS, etc. and somehow infer that all caps is the rule. $\endgroup$ – Nick Cox Dec 16 '15 at 13:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.