search for: rmvt

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

Did you mean: mvt
2017 Oct 09
2
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
1
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
1
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
1
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,...
2017 Oct 09
1
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). > > >...
2017 Oct 08
1
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 08
1
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...
2017 Oct 09
1
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...
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