*Thyne, Clayton *Intro to Stats, Chapter 5 examples clear set mem 80m cd [your directory] * NOTE: the above command asks you to change the directory. The directory will depend on how you've set up * the folders on your computer. For example, my command is... * cd F:\teaching\Fall_2008\PS572-401-baby_stats\do_file_directories\chapter5 * This is necessary so you know where stata is saving things. use "http://www.uky.edu/~clthyn2/intro_stats/data_set_1.dta" ****Part 1: correlations *play around with some correlations using data_set_1.dta ****Part 2: dangers of correlation coefficients *example 1: outliers corr cap milper scatter cap milper *solution 1: drop outliers corr cap milper if milper<2000 & cap<.04 scatter cap milper if milper<2000 & cap<.04 *solution 2: transform data hist cap gladder cap gen lcap=log10(cap) hist milper gladder milper gen lmilper=log10(milper) corr cap milper corr lcap lmilper scatter lcap lmilper