[R] Bivariate Normal Distribution Plots

S Ellison S@E|||@on @end|ng |rom LGCGroup@com
Thu Apr 12 20:11:03 CEST 2018



> -----Original Message-----
> From: R-help [mailto:r-help-bounces using r-project.org] On Behalf Of JEFFERY REICHMAN


> # Standard deviations and correlation
> sig_x <- 1
> sig_y <- 1
> rho_xy <- 0.0
> 
> # Covariance between X and Y
> sig_xy <- rho_xy * sig_x *sig_y
> 
> # Covariance matrix
> Sigma_xy <- matrix(c(sig_x ^ 2, sig_xy, sig_xy, sig_y ^ 2), nrow = 2, ncol = 2)
> ...
> Problem is this results in sigma(x) = sigma(y), rho=0 ...
> What I have created creates a circle.  
Er, yes ... that is what you asked for.

Have you tried rho_xy=0.7 or similar in the code above?


*******************************************************************
This email and any attachments are confidential. Any use...{{dropped:8}}




More information about the R-help mailing list