powered by
This function produces a scatterplot for a bivariate standard normal distribution with least squares regression line.
mvrnormplot.fnc(r, n, limits)
The correlation, defaults to 0.9.
Number of simulated data points, defaults to 100.
Optional range for the axes
A scatterplot with ordinary least squares regression line is shown on the graphics device, with sample estimate of r added at the top of the plot.
mvrnorm (MASS package)
# NOT RUN { mvrnormplot.fnc(r=0.9, n=100) # }
Run the code above in your browser using DataLab