search for: mvdnorm

Displaying 4 results from an estimated 4 matches for "mvdnorm".

Did you mean: dnorm
2000 Apr 28
0
mvdnorm???
Hello: There is a function in the MASS library called mvrnorm(), and I wonder whether R has a corresponding function mvdnorm? I don't think it would be that tough to write, but has anyone done it yet? Thanks in advance. Tom Richards -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info&quot...
2011 Nov 11
8
Help
Dear Contributors I would like to perform this operation using a loop, instead of repeating the same operation many times. The numbers from 1 to 4 related to different groups that are in the database and for which I have the same data. x<-c(1,3,7) datiP1 <- datiP[datiP$city ==1,x]; datiP2 <- datiP[datiP$city ==2,x]; datiP3 <- datiP[datiP$city ==3,x] datiP4 <-
2008 Aug 16
0
relist.Rd patch
...+61,9 @@ list(mean=c(0, 1), vcov=cbind(c(1, 1), c(1, 0))). } However, \code{\link{optim}} cannot operate on functions that take lists as input; it - only likes numeric vectors. The solution is conversion: + only likes numeric vectors. The solution is conversion. Given a + function mvdnorm(x, mean, vcov, log=FALSE) which computes the required + probability density, then \preformatted{ ipar <- list(mean=c(0, 1), vcov=cbind(c(1, 1), c(1, 0))) initial.param <- as.relistable(ipar) @@ -68,9 +71,8 @@ ll <- function(param.vector) { param <- relist(param.vect...
2009 Jan 19
0
optim() example in relist() help page
...(x) + 1) - 1) out <- matrix(0, d, d) out[lower.tri(out, TRUE)] <- x ind <- upper.tri(out) out[ind] <- t(out)[ind] out } ll <- function (param.vector) { param <- relist(param.vector, skeleton = ipar) param$vcov <- invvech(param$vcov) -sum(mvdnorm(x, mean = param$mean, vcov = param$vcov, log = TRUE)) } optim(unlist(initial.param), ll) or another example Best, Dimitris p.s., > R.Version() $platform [1] "i386-pc-mingw32" $arch [1] "i386" $os [1] "mingw32" $system [1] "i386, mingw32" $statu...