Displaying 20 results from an estimated 2000 matches similar to: "how to overlay 2d pdf atop scatter plot using ggplot2"
2017 Oct 08
0
how to overlay 2d pdf atop scatter plot using ggplot2
Hi,
I am no expert on ggplot2 and I do not know the answer to your question. I looked around a bit but could not find an answer right away. But one possibility could be, if a direct approach is not possible, to draw ellipses corresponding to the confidence regions of the multivariate t density and use geom_polygon to draw this successively?
I will wait for a couple of days to see if there is a
2017 Oct 09
2
example of geom_contour() with function argument
Can someone please point me to an example with geom_contour() that uses a
function? The help does not have an example of a function, and also I did
not find anything from online searches.
TIA,
BFD
-----------------------------------------------------------------------------------------------
How about geom_contour()?
Am So., 8. Okt. 2017, 20:52 schrieb Ranjan Maitra <maitra at
2017 Oct 09
2
example of geom_contour() with function argument
Hello Ulrik,
I apologize, but 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,
2017 Oct 09
3
example of geom_contour() with function argument
Hi,
This is not a HW problem, sadly: I was last 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,
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 )
2017 Oct 09
0
example of geom_contour() with function argument
Hi BFD,
?geom_contour() *does* have helpful examples. Your Google-foo is weak:
Searching for geom_contour brought me:
http://ggplot2.tidyverse.org/reference/geom_contour.html as the first
result.
HTH
Ulrik
On Mon, 9 Oct 2017 at 08:04 Big Floppy Dog <bigfloppydog at gmail.com> wrote:
> Can someone please point me to an example with geom_contour() that uses a
> function? The help
2017 Oct 09
0
example of geom_contour() with function argument
> On Oct 9, 2017, at 6:03 AM, Big Floppy Dog <bigfloppydog at gmail.com> wrote:
>
> Hello Ulrik,
>
> I apologize, but 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:
>
>
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
2012 Mar 19
2
hypergeometric function in ‘ mvtnorm’
Is there any way to know how the "dmvt" function computes the hypergeometric
function needed in the calculation for the density of multivariate t
distribution?
--
View this message in context: http://r.789695.n4.nabble.com/hypergeometric-function-in-mvtnorm-tp4483730p4483730.html
Sent from the R help mailing list archive at Nabble.com.
2025 May 20
2
how to read a PSB file in R?
On Tue May20'25 05:56:59AM, Rui Barradas wrote:
> From: Rui Barradas <ruipbarradas at sapo.pt>
> Date: Tue, 20 May 2025 05:56:59 +0100
> To: Ranjan Maitra <mlmaitra at gmx.com>, r-help at r-project.org
> Subject: Re: [R] how to read a PSB file in R?
>
> ?s 03:17 de 20/05/2025, Ranjan Maitra via R-help escreveu:
> > I have come across this file (warning,
2012 Jan 17
1
pretty(range(data$z),10) Error
Hello, R-List,
I'm getting error messages when adding geom_density2d() [package ggplot2]:
============================================================================
Fehler in pretty(range(data$z), 10) :
NA/NaN/Inf in externem Funktionsaufruf (arg 1)
Zusätzlich: Warnmeldungen:
1: Removed 10000 rows containing missing values (stat_contour).
2: In min(x) : kein nicht-fehlendes Argument für
2010 May 10
2
Warning message
Hello,
I want to draw a histogram of the mean of sample observations drawn from multivariate t distribution. I am getting the following error corresponding to the code I used. Though I am getting the graph, but I am curious to know the warning message.
Warning messages:
1: In if (freq) x$counts else { :
the condition has length > 1 and only the first element will be used
2: In if (!freq)
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
2001 Feb 23
4
hclust question
Dear all,
I have a question with regard to the use of hclust. I would like to be
able to specify my own distance matrix instead of asking R to compute
the distance matrix for me. It is computationally easier for me this
way. My question is: How can I get hclust to accept this?
Thanks,
Ranjan
--
***************************************************************************
Ranjan
2018 Mar 30
3
getting all circular arrangements without accounting for order
Thanks!
Yes, however, this seems a bit wasteful. Just wondering if there are other, more efficient options possible.
Best wishes,
Ranjan
On Thu, 29 Mar 2018 22:20:19 -0400 Boris Steipe <boris.steipe at utoronto.ca> wrote:
> If one is equal to the reverse of another, keep only one of the pair.
>
> B.
>
>
>
> > On Mar 29, 2018, at 9:48 PM, Ranjan Maitra
2018 Jan 18
8
reading lisp file in R
Dear friends,
Is there a way to read data files written in lisp into R?
Here is the file: https://archive.ics.uci.edu/ml/machine-learning-databases/university/university.data
I would like to read it into R. Any suggestions?
Thanks very much in advance for pointers on this and best wishes,
Ranjan
--
Important Notice: This mailbox is ignored: e-mails are set to be deleted on receipt. Please
2007 Mar 21
3
question on suppressing error messages with Rmath library
Dear list,
I have been using the Rmath library for quite a while: in the current instance, I am calling dnt (non-central t density function) repeatedly for several million. When the argument is small, I get the warning message:
full precision was not achieved in 'pnt'
which is nothing unexpected. (The density calls pnt, if you look at the function dnt.) However, to have this happen a
2018 Mar 30
2
getting all circular arrangements without accounting for order
Jeff,
I wanted to let you know that your function is faster than generating the directional circular permutations and weeding.
Here is the time for n = 10. I compared with just doing the permutations, there is no point in proceeding further with the weeding since it is slower at the start itself.
system.time(directionless_circular_permutations(10))
user system elapsed
1.576 0.000
2018 Mar 30
0
getting all circular arrangements without accounting for order
I don't know if this is more efficient than enumerating with distinct
directions and weeding... it seems kind of heavyweight to me:
#######
library(gtools)
directionless_circular_permutations <- function( n ) {
v <- seq.int( n-1 )
ix <- combinations( n-1, 2 )
jx <- permutations( n-3, n-3 )
x <- lapply( seq.int( nrow( ix ) )
, function( i ) {
2011 Mar 20
3
manova question
Dear friends,
Sorry for this somewhat generically titled posting but I had a question
with using contrasts in a manova context. So here is my question:
Suppose I am interested in doing inference on \beta in the case of the
model given by:
Y = X %*% \beta + e
where Y is a n x p matrix of observations, X is a n x m design matrix,
\beta is m x p matrix of parameters, and e is a