search for: rmvt

Displaying 14 results from an estimated 14 matches for "rmvt".

Did you mean: mvt
2017 Oct 09
3
example of geom_contour() with function argument
...t in a classroom 30 years ago, and can no longer run off to the instructor :-( I apologize but I cut and paste the wrong snippet earlier and made a typo in doing so, but the result is the same with the more appropriate snippet. require(mvtnorm) require(ggplot2) set.seed(1234) xx <- data.frame(rmvt(100, df = c(13, 13))) v <- ggplot(data = xx, aes(x = X1, y = X2, z = dmvt, df = c(13,13))) v + geom_contour() Don't know how to automatically pick scale for object of type function. Defaulting to continuous. Error: Aesthetics must be either length 1 or the same as the data (100): x, y, z,...
2017 Oct 09
0
example of geom_contour() with function argument
library(mvtnorm) # you were misusing "require"... only use require if you plan to library(ggplot2) # test the return value and fail gracefully when the package is missing set.seed( 1234 ) xx <- data.frame( rmvt( 100, df = c( 13, 13 ) ) ) xx2 <- expand.grid( X1 = seq( -5, 5, 0.1 ) # all combinations... could be used to fill a matrix , X2 = seq( -5, 5, 0.1 ) ) # compute density as a function of the grid of points xx2$d <- dmvt( as.matrix( xx2[,1:2] ) ) # feels we...
2017 Oct 09
2
example of geom_contour() with function argument
...t I can not see how to provide a pdf in place of the density function which calculates a KDE (that is, something from the dataset in the example). Can you please point to the specific example that might help? Here is what I get: require(mvtnorm) require(ggplot2) set.seed(1234) xx <- data.frame(rmvt(100, df = c(13, 13))) v <- ggplot(faithfuld, aes(waiting, eruptions, z = drmvt, df = c(13,13))) v + geom_contour() Don't know how to automatically pick scale for object of type function. Defaulting to continuous. Error: Aesthetics must be either length 1 or the same as the data (5625): x,...
2010 May 10
2
Warning message
...f (!freq) "Density" else "Frequency" : the condition has length > 1 and only the first element will be used ----------------------------------------------------------------------------------- library(mvtnorm); s12<-c(1:1000); var21<-lapply(s12,function(x){ rs<-rmvt(10, sigma=diag(8), df=1); my<-mean(rs); sy<-sqrt(var(rs)) return(cbind(my,sy)) }); data1<-do.call(rbind,var21); dataMat<-data.frame(data1); W<-dataMat$my; hist(W,breaks=20,probability=T) ----------------------------------------------------------------------------------...
2017 Oct 09
0
example of geom_contour() with function argument
...of the density > function which calculates a KDE (that is, something from the dataset in the > example). Can you please point to the specific example that might help? > > Here is what I get: > > require(mvtnorm) > require(ggplot2) > set.seed(1234) > xx <- data.frame(rmvt(100, df = c(13, 13))) > > > v <- ggplot(faithfuld, aes(waiting, eruptions, z = drmvt, df = c(13,13))) > v + geom_contour() > > Don't know how to automatically pick scale for object of type function. > Defaulting to continuous. > Error: Aesthetics must be either len...
2017 Oct 09
2
example of geom_contour() with function argument
...en it there also but I thought that this > > list of experts may have someone who knows the answer. > > > > I have the following example code: > > > > > > > > require(mvtnorm) > > require(ggplot2) > > set.seed(1234) > > xx <- data.frame(rmvt(100, df = c(13, 13))) > > ggplot(data = xx, aes(x = X1, y= X2)) + geom_point() + geom_density2d() > > > > > > > > It yields a scatterplot of X2 against X1 and a KDE contour plot of the > > density (as it should). > > > > My question is: is it possibl...
2017 Oct 08
2
how to overlay 2d pdf atop scatter plot using ggplot2
...plot-2d-probability-density-function-on-top-of-points-on-ggplot Apologies for those who have seen it there also but I thought that this list of experts may have someone who knows the answer. I have the following example code: require(mvtnorm) require(ggplot2) set.seed(1234) xx <- data.frame(rmvt(100, df = c(13, 13))) ggplot(data = xx, aes(x = X1, y= X2)) + geom_point() + geom_density2d() It yields a scatterplot of X2 against X1 and a KDE contour plot of the density (as it should). My question is: is it possible to change the contour plot to display the contours of a two-dimensional d...
2017 Oct 09
0
example of geom_contour() with function argument
...> list of experts may have someone who knows the answer. > > > > > > I have the following example code: > > > > > > > > > > > > require(mvtnorm) > > > require(ggplot2) > > > set.seed(1234) > > > xx <- data.frame(rmvt(100, df = c(13, 13))) > > > ggplot(data = xx, aes(x = X1, y= X2)) + geom_point() + > geom_density2d() > > > > > > > > > > > > It yields a scatterplot of X2 against X1 and a KDE contour plot of the > > > density (as it should). > > >...
2003 Feb 15
2
(no subject)
Hi, Are there some packages which can generate multi-normal, multi-t, etc multivariate sampling? thanks! Best wishes, Peng ******************************* Peng Zhang Department of Biostatistics Harvard School of Public Health 655 Huntington Avenue Boston, Massachusetts 02115 ******************************* I believe I can fly I believe I can touch the sky
2017 Oct 08
0
how to overlay 2d pdf atop scatter plot using ggplot2
...lot > > Apologies for those who have seen it there also but I thought that this > list of experts may have someone who knows the answer. > > I have the following example code: > > > > require(mvtnorm) > require(ggplot2) > set.seed(1234) > xx <- data.frame(rmvt(100, df = c(13, 13))) > ggplot(data = xx, aes(x = X1, y= X2)) + geom_point() + geom_density2d() > > > > It yields a scatterplot of X2 against X1 and a KDE contour plot of the > density (as it should). > > My question is: is it possible to change the contour plot to disp...
2002 Oct 02
4
T-Distribution
Dear sir, I would ask if there are in R some code to generate a random sample from a mvariate student distribution like that one wich generate the multivariate normal one i mean( rmvnorm(n, mu, sigma) Second question : if R can plot density 3Dcurve I don't mean de histogram but de hole density function(normal for example). I use a windows version of The R software Thank you in advance wiyh
2005 Feb 24
1
Density of the Multivariate T Distribution
Hi, I am looking for an efficient way to compute the values of the density function of a multivariate T distribution - something like "dmvnorm", but for T distr. Does this exist somewhere? Many thanks, Jan Bulla Goettingen University
2007 Oct 09
1
Multivariate chi-square distribution function
Dear All, Is there any function in R for computing "multivariate chi-square distribution"? How about "multivariate gamma distribution"? I appreciate any comment on this subject. Thank you, Amin Zollanvari PhD student Department of Electrical and Computer Engineering, Texas A&M University, College Station, TX
2010 Aug 24
0
mlm for within subject design
...6752 8.580032 cov(x2) [,1] [,2] [,3] [1,] 1.0786150 0.4719868 0.5082440 [2,] 0.4719868 0.9608204 0.4819515 [3,] 0.5082440 0.4819515 1.0264072 colMeans(x2) [1] 1.042077 5.011792 10.025397 Package mvtnorm also has a function to obtain samples from multivariate-t distributions (rmvt). See the help pages of these functions for examples and further details. For simulating random fields, there are two packages of which I'm aware: RandomFields and FieldSim. It might also be worth checking out the Spatial Task View @ CRAN to see if anything else is available to help you. HTH,...