similar to: Multivariate Normal: Help wanted!

Displaying 20 results from an estimated 1100 matches similar to: "Multivariate Normal: Help wanted!"

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
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. +
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,
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
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)) >
2012 Apr 25
2
comparison of bivariate normal distributions
sorry for cross-posting Dear all, I have tow (several) bivariate distributions with a known mean and variance-covariance structure (hence a known density function) that I would like to compare in order to get an intersect that tells me something about "how different" these distributions are (as t-statistics for univariate distributions). In order to visualize what I mean hear a little
2003 Nov 03
1
svm in e1071 package: polynomial vs linear kernel
I am trying to understand what is the difference between linear and polynomial kernel: linear: u'*v polynomial: (gamma*u'*v + coef0)^degree It would seem that polynomial kernel with gamma = 1; coef0 = 0 and degree = 1 should be identical to linear kernel, however it gives me significantly different results for very simple data set, with linear kernel
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.
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]]
2011 Sep 03
1
Bootstrapping a covariance matrix
Dear all I am a bit new to R so please keep your swords sheathed! I would simply like to bootstrap a covariance matrix from a multivariate gaussian density. At face value that seemed like a very straightforward problem to solve but I somehow could not get the boot package to work and did not really understand the documentation so I tried to do the bootstrap manually. Hence: x<-rmvnorm(n = 5,
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;
2012 Nov 13
1
About systemfit package
Dear friends, I have written the following lines in R console wich already exist in pdf file systemfit: data( "GrunfeldGreene" ) library( "plm" ) GGPanel <- plm.data( GrunfeldGreene, c( "firm", "year" ) ) greeneSur <- systemfit( invest ~ value + capital, method = "SUR", + data = GGPanel ) greenSur I have obtained the following incomplete
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?
2009 Apr 10
1
Random Forests: Question about R^2
Dear Random Forests gurus, I have a question about R^2 provided by randomForest (for regression). I don't succeed in finding this information. In the help file for randomForest under "Value" it says: rsq: (regression only) - "pseudo R-squared'': 1 - mse / Var(y). Could someone please explain in somewhat more detail how exactly R^2 is calculated? Is "mse"
2005 Mar 09
1
nnet abstol
Hi, I am using nnet to learn transfer functions. For each transfer function I can estimate the best possible Mean Squared Error (MSE). So, rather than trying to grind the MSE to 0, I would like to use abstol to stop training once the best MSE is reached. Can anyone confirm that the abstol parameter in the nnet function is the MSE, or is it the Sum-of-Squares (SSE)? Best regards, Sam.
2003 Aug 20
2
Method of L-BFGS-B of optim evaluate function outside of box constraints
Hi, R guys: I'm using L-BFGS-B method of optim for minimization problem. My function called besselI function which need non-negative parameter and the besselI will overflow if the parameter is too large. So I set the constraint box which is reasonable for my problem. But the point outside the box was test, and I got error. My program and the error follows. This program depends on CircStats
2023 Oct 22
1
running crossvalidation many times MSE for Lasso regression
Dear R-experts, Here below my R code with an error message. Can somebody help me to fix this error?? Really appreciate your help. Best, ############################################################ #?MSE CROSSVALIDATION Lasso regression? library(glmnet) ?
2007 Aug 22
3
integrate
Hi, I am trying to integrate a function which is approximately constant over the range of the integration. The function is as follows: > my.fcn = function(mu){ + m = 1000 + z = 0 + z.mse = 0 + for(i in 1:m){ + z[i] = rnorm(1, mu, 1) + z.mse = z.mse + (z[i] - mu)^2 + } + return(z.mse/m) + } > my.fcn(-10) [1] 1.021711 > my.fcn(10) [1] 0.9995235 > my.fcn(-5) [1] 1.012727 > my.fcn(5)
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.