Displaying 20 results from an estimated 11000 matches similar to: "multivariate numerical integration."
2009 Jun 22
1
The gradient of a multivariate normal density with respect to its parameters
Does anybody know of a function that implements the derivative (gradient) of
the multivariate normal density with respect to the *parameters*?
It?s easy enough to implement myself, but I?d like to avoid reinventing the
wheel (with some bugs) if possible. Here?s a simple example of the result
I?d like, using numerical differentiation:
library(mvtnorm)
library(numDeriv)
f=function(pars, xx, yy)
2010 Jun 03
3
General-purpose GPU computing in statistics (using R)
Hi All,
I have been reading about general purpose GPU (graphical processing units)
computing for computational statistics. I know very little about this, but
I read that GPUs currently cannot handle double-precision floating points
and also that they are not necessarily IEEE compliant. However, I am not
sure what the practical impact of this limitation is likely to be on
computational
2009 Sep 23
1
Maximum Likelihood Est. regarding the degree of freedom of a multivariate skew-t copula
Hello,
I have a bigger problem in calculating the Maximum Likelihood Estimator regarding the degree of freedom of a multivariate skew-t copula.
First of all I would like to describe what this is all about, so that you can understand my problem:
I have 2 time series with more than 3000 entries each. I would like to calculate a multivariate skew-t Copula that fits this time series.
Notice:
2009 Nov 03
2
1 dimensional optimization with local minima
I am using numerical optimization to fit a 1 parameter model, in which the
input parameter is bounded. I am currently using optimize(), however, the
problem turns out to have local minima, and optimize does not always seem to
find the global minimum. I could to write a wrapping function that tries
multiple intervals or starting values, but I would prefer a package that has
built-in methods to make
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 Oct 15
4
Generating a stochastic matrix with a specified second dominant eigenvalue
Hi,
Given a positive integer N, and a real number \lambda such that 0 < \lambda
< 1, I would like to generate an N by N stochastic matrix (a matrix with
all the rows summing to 1), such that it has the second largest eigenvalue
equal to \lambda (Note: the dominant eigenvalue of a stochastic matrix is
1).
I don't care what the other eigenvalues are. The second eigenvalue is
2009 Jul 02
2
constrained optimisation in R.
i want to estimate parameters with maximum likelihood method with contraints (contant numbers).
for example
sum(Ai)=0 and sum(Bi)=0
i have done it without the constraints but i realised that i have to use the contraints.
Without constraints(just a part-not complete):
skellamreg_LL=function(parameters,z,design)
{
n=length(z);
mu=parameters[1];
H=parameters[2];
Apar=parameters[3:10];
2009 Sep 05
2
Anova over a list of models
I have a list object, in which I have stored n lme4-models. For example:
library(lme4);
myModels <- list();
myModels[1] <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)
myModels[2] <- lmer(Reaction ~ Days + (1|Subject) + (0+Days|Subject),
sleepstudy)
Now I would like to perform an anova over all models in the list. However,
the anova function requires that every model is inserted
2009 Sep 23
1
Numerical integration problem
Hi there
I'm trying to construct a model of mortality risk in 2D space that
requires numerical integration of a hazard function, for which I'm using
the integrate function. I'm occasionally encountering parameter
combinations that cause integrate to terminate with error "Error in
integrate... the integral is probably divergent", which I'm not sure how
to interpret. The
2009 Sep 06
3
[Hmisc] Latex to pdf
I would like to print some tables and figures to a PDF device on a CentOS 5
vps. However, I cannot seem to get the latex function from Hmisc working. I
followed the example, and got an error: sh: xdvi: command not found. I tried
installing the 'tetex-xdvi' linux package, and now it returns: Error: Can't
open display. I guess the reason for this is that the machine is a VPS
terminal, so
2009 Aug 12
1
Problem Installing R 2.9.1.1 RHEL x86_64 binary
I just grabbed the new EL5 binary's for my x64 VPS from CRAN. However, where
updates usually go smoothly, I now get these errors:
-bash-3.2# rpm -i R-2.9.1-1.el5.x86_64.rpm
error: Failed dependencies:
R-devel = 2.9.1-1.el5 is needed by R-2.9.1-1.el5.x86_64
-bash-3.2# rpm -i R-core-2.9.1-1.el5.x86_64.rpm
error: Failed dependencies:
perl(File::Copy::Recursive) is needed by
2009 Sep 05
1
Convert dataframe to array of records
I would like to convert a dataframe to an array of lists, one for every
record. A natural choide is apply as.list to the rows. However, as it seems,
as.list() automatically converts all list elements to the same datatype. Eg:
myData <- data.frame(a="foo",b=as.logical(rbinom(10,1,.5)));
apply(myData,1,as.list);
In this output, all boolean values have been converted to character
2007 Jun 20
4
finding roots of multivariate equation
Hello,
I want to find the roots of an equation in two variables. I am aware of the
uniroot function, which can do this for a function with a single variable (as I
understand it...) but cannot find a function that does this for an equation
with more than one variable. I am looking for something implementing similar
to a Newton-Raphson algorithm.
Thanks.
--
Bill Shipley
North American Editor for
2009 Feb 28
1
lme4 and Variable level detection
I am making a little GUI for lme4, and I was wondering if there is a function
that automatically detects on which level every variable exists.
Furtheremore I got kind of confused about what a random effects model
actually calculates.
I have some experience with commercial software packages for multilevel
analysis, like HLM6, and I was surprised that lme4 does not require the user
to specify the
2006 Oct 27
2
Multivariate regression
Hi,
Suppose I have a multivariate response Y (n x k) obtained at a set of
predictors X (n x p). I would like to perform a linear regression taking
into consideration the covariance structure of Y within each unit - this
would be represented by a specified matrix V (k x k), assumed to be the same
across units. How do I use "lm" to do this?
One approach that I was thinking of
2009 Mar 07
4
multivariate integration and partial differentiation
Could somebody share some tips on implementing multivariate integration and partial differentiation in R?
For example, for a trivariate joint distribution (cumulative density function) of F(x,y,z), how to differentiate with respect to x and get the bivariate distribution (probability density function) of f(y,z). Or integrate f(x,y,z) with respect to x to get bivariate distribution of (y,z).
Your
2009 Mar 07
10
popular R packages
I would like to get some idea of which R-packages are popular, and what R is
used for in general. Are there any statistics available on which R packages
are downloaded often, or is there something like a package-survey? Something
similar to http://popcon.debian.org/ maybe? Any tips are welcome!
-----
Jeroen Ooms * Dept. of Methodology and Statistics * Utrecht University
Visit
2020 Sep 09
3
more Matrix weirdness
I think that this is because `[<-` dispatches on S4 methods only if the first argument is S4.
?"[<-" says:
"These operators are also implicit S4 generics, but as primitives,
S4 methods will be dispatched only on S4 objects ?x?."
Georgi Boshnakov
-----Original Message-----
Message: 19
Date: Tue, 8 Sep 2020 22:04:44 -0400
From: Ben Bolker <bbolker at
2009 Jul 02
1
lokern package
Dear Martin,
I have been playing a lot with the glkerns() function in the "lokern"
package for "automatic" smoothing of time-series data. This kernel
smoothing approach of Gasser and Mueller seems to perform quite well for
estimating the function and its derivatives (first and second derivatives).
In fact, this is one of the best methods based on my simulation studies for
2009 Nov 03
1
Passing Command to Optim in factanal
Hi,
I am currently trying to execute the following command:
f<-factanal(factors=k$Components$nparallel,covmat=m,n.obs=2287,rotation="varimax",control=list(opt=list(method=c("BFGS"))))
but keep getting the error: L-BFGS-B needs finite values of 'fn'
I can't figure out what I am doing wrong here, why isn't optim being told to use BFGS instead of L-BFGS-B...