# # EPage 141 # # Written by: # -- # John L. Weatherwax 2009-04-21 # # email: wax@alum.mit.edu # # Please send comments and especially bug reports to the # above email address. # #----- library(DAAG) set.seed(32083) x = rnorm( 100, mean=3, sd=7 ) print( mean(x) ) lsfun = function(mu) apply(outer(x,mu,"-")^2, 2, sum) curve( lsfun, from=4.0, to=4.3 ) # make sure that "from" and "to" are on either side of the mean