similar to: NumDeriv - derivatives of covariance matrix

Displaying 20 results from an estimated 1000 matches similar to: "NumDeriv - derivatives of covariance matrix"

2009 Nov 20
2
Problem with Numerical derivatives (numDeriv) and mvtnorm
I'm trying to obtain numerical derivative of a probability computed with mvtnorm with respect to its parameters using grad() and jacobian() from NumDeriv. To simplify the matter, here is an example: PP1 <- function(p){ thetac <- p thetae <- 0.323340333 thetab <- -0.280970036 thetao <- 0.770768082 ssigma <- diag(4) ssigma[1,2] <- 0.229502120
2003 Jul 17
3
Looking to maximize a conditional likelihood
I want to maximize a conditional likelihood function that is basically logistic conditional on the number of successes within strata. What would be a good starting place for this? A complication is that the denominator includes a term that is the sum over all permutations. Although there is no time dimension to the problem, it's possible a degenerate use of the Cox proportional hazards
2009 May 10
4
Partial Derivatives in R
Quick question: Which function do you use to calculate partial derivatives from a model equation? I've looked at deriv(), but think it gives derivatives, not partial derivatives. Of course my equation isn't this simple, but as an example, I'm looking for something that let's you control whether it's a partial or not, such as: somefunction(y~a+bx, with respect to x,
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)
2007 Mar 01
2
Using R for devices trial
I would like to use R for submissions to FDA/CDRH (the medical device company I work for currently uses only SAS). Previous postings to the list regarding R and 21 CFR 11 compliance have been very helpful. However, reluctance to using open source software for statistical analyses and reporting remains high here at my company. Has anyone used R for an official submission to FDA/CDRH? It would
2009 Jan 11
2
R, clinical trials and the FDA
I hope that Marc doesn't mind, but I felt that part of his recent post was important enough to deserve it's own subject line rather then being lost in a 60-msg-long thread... On Sun, Jan 11, 2009 at 10:08 AM, Marc Schwartz <marc_schwartz at comcast.net> wrote: ... I strongly believe that the comments regarding R and the FDA are overly negative and pessimistic. The hurdles to
2011 Apr 19
2
Markov transition matrices , missing transitions for certain years
Hi all, I am working for nest box occupancy data for birds and would like to construct a Markov transition matrix, to derive transition probabilities for ALL years of the study (not separate sets of transition probabilities for each time step). The actual dataset I'm working with is 125 boxes over 14 years that can be occupied by 7 different species, though I have provided a slimmed down
2009 Aug 01
4
Likelihood Function for Multinomial Logistic Regression and its partial derivatives
Hi, I would like to apply the L-BFGS optimization algorithm to compute the MLE of a multilevel multinomial Logistic Regression. The likelihood formula for this model has as one of the summands the formula for computing the likelihood of an ordinary (single-level) multinomial logit regression. So I would basically need the R implementation for this formula. The L-BFGS algorithm also requires
2010 Sep 21
5
Can ucminf be installed in 64 bit R and one more question?
Hey, R Users my windows is 64 bit windows 7.?I am trying to install the package ucminf into my 64 bit version R but cannot.??the package I downloaded is from http://cran.r-project.org/web/packages/ucminf/index.html?and I installed it with the "install from local zip files", due to I did not connect my computer to internet. did anyone meet this problem and is there a version of
2010 Nov 06
1
saddle points in optim
Hi, I've been trying to use optim to minimise least squares for a function, and then get a guess at the error using the hessian matrix (calculated from numDeriv::hessian, which I read in some other r-help post was meant to be more accurate than the hessian given in optim). To get the standard error estimates, I'm calculating sqrt(diag(solve(x))), hope that's correct. I've found
2011 Sep 22
1
nlm's Hessian update method
Hi R-help! I'm trying to understand how R's nlm function updates its estimate of the Hessian matrix. The Dennis/Schnabel book cited in the references presents a number of different ways to do this, and seems to conclude that the positive-definite secant method (BFGS) works best in practice (p201). However, when I run my code through the optim function with the method as "BFGS",
2012 Nov 15
1
hessian fails for box-constrained problems when close to boundary?
Hi I am trying to recover the hessian of a problem optimised with box-constraints. The problem is that in some cases, my estimates are very close to the boundary, which will make optim(..., hessian=TRUE) or optimHessian() fail, as they do not follow the box-constraints, and hence estimate the function in the unfeasible parameter space. As a simple example (my problem is more complex though,
2011 Mar 15
1
Problem with nls.lm function of minpack.lm package.
Dear R useRs, I have a problem with nls.lm function of minpackl.lm package. I need to fit the Van Genuchten Model to a set of data of Theta and hydraulic conductivity with nls.lm function of minpack.lm package. For the first fit, the parameter estimates keep changing even after 1000 iterations (Th) and I have a following error message for fit of hydraulic conductivity (k); Reason for
2006 Nov 01
2
Hessian matrix
Dear all R users, Is there any way to calculate hessian matrix of a given function at any given point? Regards [[alternative HTML version deleted]]
2011 Aug 29
3
gradient function in OPTIMX
Dear R users When I use OPTIM with BFGS, I've got a significant result without an error message. However, when I use OPTIMX with BFGS( or spg), I've got the following an error message. ---------------------------------------------------------------------------------------------------- > optimx(par=theta0, fn=obj.fy, gr=gr.fy, method="BFGS", >
2009 Apr 29
2
Optim and hessian
Hi, my name is Marcel R. Lopes. My problem is, I made a code to calculate the estimates of a Cox model with random effects. Used to optimize the R command for this. The estimates were calculated correctly, but the Hessian matrix does not have good values. The same thing was done in SAS and gave good results for the Hessian Matrix. Where is the problem in R? As the Hessian is calculated?. How
2016 Apr 06
1
Optimization max likelihood problem
hello all, I am getting wrong estimates from this code. do you know what could be the problem. thanks x<- c(1.6, 1.7, 1.7, 1.7, 1.8, 1.8, 1.8, 1.8) y <- c( 6, 13, 18, 28, 52, 53, 61, 60) n <- c(59, 60, 62, 56, 63, 59, 62, 60) DF <- data.frame(x, y, n) # note: there is no need to have the choose(n, y) term in the likelihood fn <- function(p, DF) { z <- p[1]+p[2]*DF$x
2010 Jul 06
2
numerical derivative R help
I fit my CDF to sum of exponentials and now I want to take the numerical derivative of this function to obtain probability density.I will really appreciate your help reagrding the error messages I am getting which I don't understand. * * > fitterma <- function(xtime) { a <- -0.09144115 b <- -0.01335756 c <- -2.368057 d <- -0.00600052
2013 Sep 13
2
R CMD check fails in R-devel r63910
Hi, The R CMD check is successful in R 3.0.1 but fails to install package lmerTest under R-devel r63910, Here is what I get: ** preparing package for lazy loading Error in reconcilePropertiesAndPrototype(name, slots, prototype, superClasses, : no definition was found for superclass "merMod" in the specification of class "merModLmerTest" In DESCRIPTION file I have:
2012 Aug 31
3
fitting lognormal censored data
Hi , I am trying to get some estimator based on lognormal distribution when we have left,interval, and right censored data. Since, there is now avalible pakage in R can help me in this, I had to write my own code using Newton Raphson method which requires first and second derivative of log likelihood but my problem after runing the code is the estimators were too high. with this email ,I provide