Displaying 20 results from an estimated 1200 matches similar to: "comparison of bivariate normal distributions"
2006 Jun 06
1
Problems using quadprog for solving quadratic programming problem
Hi,
I'm using the package quadprog to solve the following quadratic programming problem.
I want to minimize the function
(b_1-b_2)^2+(b_3-b_4)^2
by the following constraints b_i, i=1,...,4:
b_1+b_3=1
b_2+b_4=1
0.1<=b_1<=0.2
0.2<=b_2<=0.4
0.8<=b_3<=0.9
0.6<=b_4<=0.8
In my opinion the solution should be b_1=b_2=0.2 und b_3=b_4=0.8.
Unfortunately R doesn't find
2008 Oct 01
2
Bivariate normal
Package mvtnorm provides dmvnorm, pmvnorm that can be used to compute
Pr(X=x,Y=y) and Pr(X<x,Y<y) for a bivariate normal.
Are there functions that would compute Pr(X<x,Y=y)?
I'm currently using "integrate" with dmvnorm but it is too slow.
2002 Nov 12
1
Probabilities for bivariate normal distribution with adapt
Dear R-List:
I`m trying to calculate the probabilities for a bivariate normal
distribution while using the mvtnorm-package(dmvnorm) and the
adapt-package for multidimensional integration.
The problem is that I can`t specify the upper bound in the adapt-package
the way I need it because I don`t need a rectangular area. I want to
calculate the probability starting at the origin under the line y=x.
2006 Mar 11
2
Draw level lines on the surface of a bivariate function
Hello,
Is it possible to draw level lines on the surface of a bivariate function?
In the following example, to draw surface and levels lines for a
multivariate normal law,
I use persp, trans3d, contourLines and lines,
but if the lines are correctly drawn, some parts of them are, of
course, visible
even if they are drawn on a non visible "face".
Any suggestion to avoid this problem
2001 Aug 30
1
MCMC coding problem
Dear All,
I am trying to convert some S-plus code that I have to run MCMC into
R-code. The program works in S-plus, but runs slowly.
I have managed to source the program into R. R recognizes that the program
is there; for example, it will display the code when I type the function
name at the prompt. However, the program will not run. When I try to run
the program, I get the following error
2006 Jan 20
2
big difference in estimate between dmvnorm and dnorm, how come?
Dear R community,
I was trying to estimate density at point zero of a multivariate
distribution (9 dimensions) and for this I was using a multinormal
approximation and the function dmvnorm , gtools package.
To have a sense of the error I tried to look the mismatch between a
unidimensional version of my distribution and estimate density at
point zero with function density, dmvnorm and dnorm.
At
2013 Jan 28
1
Adding 95% contours around scatterplot points with ggplot2
Hi all,
I have been looking for means of add a contour around some points in a
scatterplot as a means of representing the center of density for of the
data. I'm imagining something like a 95% confidence estimate drawn around
the data.
So far I have found some code for drawing polygons around the data. These
look nice, but in some cases the polygons are strongly influenced by
outlying points.
2004 Oct 31
3
strange results with dmvnorm
I am experiencing strange results using dmvnorm. I define a scaled distance
matrix from the coordinates bellow and then calculate a covariance matrix using
a spherical correlation function. Then with certain combinations of
range and sill parameters dmvnorm is returning values greater than 1. Surely
the results of dmvnorm should be in the interval 0:1 (or do I just nead a
holiday?). In addition
2013 Jun 06
1
dmvnorm
Summary:
+ I am writing an R extension that needs to call dmvnorm more than
10,000 times during a model fitting computation.
+ My extension uses openmp for parallel execution.
+ As of R 3.0, it is no longer permitted for threads to call the R
interpreter because there is a stack overflow check that always trips
because the thread's stack is different from what R is expecting.
+
2011 Aug 30
2
Multivariate Normal: Help wanted!
I have the following function, a MSE calc based on some Multivariate normals:
MV.MSE<-function(n,EP,X,S){
(dmvnorm(X,mean=rep(0,2),I+S+EP)-dmvnorm(X,mean=rep(0,2),I+S))^2
+
1/n*(dmvnorm(X,mean=rep(0,2),1+S+EP/2)*det(4*pi*EP)^-.5-
(dmvnorm(X,mean=rep(0,2),I+S+EP ))^2)}
I can get the MV.MSE for given values of the function e.g
2010 Jun 23
3
integrate dmvtnorm
Hello, everyone,
I have a question about integration of product of two densities.
Here is the sample code; however the mean of first density is a function of
another random variable, which is to be integrated.
##
f=function(x) {dmvnorm(c(0.6, 0.8), mean=c(0.75, 0.75/x))*dnorm(x, mean=0.6,
sd=0.15)}
integrate(f, lower=-Inf, upper=Inf)
## error message
Error in dmvnorm(c(0.6, 0.8), mean = c(0.75,
2010 Mar 13
2
dmvnorm masked by emdbook
I am using curve3d in the emdbook package to graph a gaussian copula density
function generated via the copula package. Unfortunately, it appears that
emdbook masks dmvnorm from the package mvtnorm in a way that prohibits
copula from generating the gaussian copula. (Sounds very confusing!) For
example,
> library(copula)
> f<-function(x,y) dcopula(normalCopula(0),c(x,y))
>
2009 Jun 01
1
survreg.distributions() error
Hi there.
I am receiving an unexpected error message when creating a new
distribution for the survreg() function in the survival package. I
understand the survival.distributions() function and have been
following the Cauchy example provided in the help file.
My goal is to use survreg to fit a gamma distribution to interval
censored data.
Here is a simple example of what I'm trying to do.
2007 Feb 26
3
returns from dnorm and dmvnorm
Hi All,
Why would calls to dnorm and dmvnorm return values that are above 1? For
example,
> dnorm(0.00003,mean=0, sd=0.1)
[1] 3.989423
This is happening on two different installations of R that I have.
Thank you.
Hailu
[[alternative HTML version deleted]]
2008 Mar 23
2
problem with 'install.packages'
Hi, All:
Is there a way to identify whether any users are using a
particular package in a shared network R installation?
I ask, because we have such a multiple-user installation and when
I tried to install a package using Rgui that was in use by Rterm on a
single-user installation, 'install.packages' deleted the existing
package but failed to install the new version;
2013 Oct 20
5
nlminb() - how do I constrain the parameter vector properly?
Greets,
I'm trying to use nlminb() to estimate the parameters of a bivariate normal sample and during one of the iterations it passes a parameter vector to the likelihood function resulting in an invalid covariance matrix that causes dmvnorm() to throw an error. Thus, it seems I need to somehow communicate to nlminb() that the final three parameters in my parameter vector are used to
2001 Sep 05
3
Fitting distributions
Are there any functions in R for fitting distributions? In particular, I
would like to fit the weibull and extreme-value distributions when:
i) the data are given and the maximum likelihood estimates are required;
ii) the sample moments are available but the complete data record is not
(so moment estimates are required).
Any suggestions will be gratefully received.
2009 Nov 18
2
Error "system is computationally singular" by using function dmvnorm
Dear R users,
i try to use function dmvnorm(x, mean, sigma, log=FALSE)
from R package mvtnorm to calculate the probability of x
under the multivariate normal distribution with mean equal
to mean and covariance matrix sigma.
I become the following
Error in solve.default(cov, ...) :
system is computationally singular: reciprocal condition
number = 1.81093e-19
What could be the reason of it?
2011 Feb 09
1
Plot bivariate density with densities margins
Dear R users,
I would like to plot the bivariate density surface with its marginal
densities on the sides of the 3D box, just like in the picture I attach. I
tried to found information about how to do it but did not find anything.
Does anyone know how to do it?
Thanks in advance,
Eduardo.
2020 Jun 04
2
mclust package installation is preparing for lazy loading and never finishes
Hi,
After loading R 4.0.0 on Ubuntu 20.04.
R version 4.0.0 (2020-04-24) -- "Arbor Day"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()'