Maps with ggmap

Ggplot2 is a powerful and awesome tool to visualize data and statistical analysis in R. Today I’d like to show you how to plot spatial data over static maps from Google Maps, OpenStreetMap, Stamen Maps, or CloudMade Maps. Ggmap which allows us to visualize any part of the world with a simple code. This function download coordinates with get_map() and then plot the map. qmplot() is…

Linear Contrast

How to do a linear contrast with nonparametric regression In R, we can use  sm.regression()  for apply non parametric regression. We add the option model=”linear”  to do a linear contrast.  The example showed here is about results of mba grade  with 3 variables: gender, gmat and gpa. The objetive is estimate gpa given gmat. We not reject linear hypothesis…

Contrasting Effect

How to apply no effect test in R with nonparametric regression For contrast no effect test we’ll use the dataset trawl from sm library, in R. The data refer to a survey of the fauna on the sea bed lying between the coast of northern Queensland and the Great Barrier Reef. The independent variable is Depth, the bottom depth…