Re: [R] Optimize function in R: unable to find maximum of logistic function

2013-10-28 Thread Shantanu MULLICK
uick non-convex optimiser functions? Best Regards, Shantanu Mullick PhD Candidate ESSEC Business School On 28 October 2013 22:01, Rolf Turner wrote: > > This could be described as a bug, perhaps. Or it could be described as > an indication that numerical optimization is inevitably tricky.

[R] Optimize function in R: unable to find maximum of logistic function

2013-10-28 Thread Shantanu MULLICK
Hello Everyone, I want to perform a 1-D optimization by using the optimize() function. I want to find the maximum value of a "logistic" function. The optimize() function gives the wrong result. My code: f= function (k) { T_s = 20 result = (2- 2/(1+ exp(-2*T_s*k))) return(result) } optimize(f, c(0

[R] R utilizing 25% of CPU for Dual core i3 370M processor

2012-08-17 Thread Shantanu MULLICK
Hello Everyone I have a dual-core Intel i3-370M processor and Windows 64 operating system. I have a 3GB RAM and my processor can support a maximum of 8GB RAM. I have virtual memory enabled on my computer. I am running a program in the 64 bit R which implements a MCMC on a large dataset and invol

[R] Parameterization of Inverse Wishart distribution available in MCMCpack and bayesm libraries

2012-03-01 Thread Shantanu MULLICK
Hello Everyone Both the MCMCpack and the bayesm libraries allow us to make draws from the Inverse Wishart distribution. But I wanted to find out how exactly is the Inverse Wishart distribution parameterized in these libraries. The reason I ask is the following: Now its generally standard to exp

[R] System is computationally singular error when using cholesky decompostion in MCMC

2012-02-20 Thread Shantanu MULLICK
Hello Everyone I have a MCMC loop to calculate a time varying hierarchical Bayesian structure. This requires me to use around 5-6 matrix inversions in the loop. I use cholesky and chol2inv for the matrix decomposition. Because of the data I am working with I am required to invert a 167 by 167 m

Re: [R] Simulating from "matrix variate normal distribution"

2012-02-05 Thread Shantanu MULLICK
hould be easy to write. But it is not clear what > you mean by a quantile function (of a matrix variate distribution). A > cdf is going to be a lot harder, but still doable. > > Hope this helps! > > best wishes, > Ranjan > > > > > > On Sat, 4 Feb 2012 00:57:45

[R] Simulating from a Normal Inverted Wishart distribution

2012-02-05 Thread Shantanu MULLICK
Hello everyone I was wondering how would one simulate from a Normal Wishart Distribution in R. A normal inverted Wishart distribution is denoted by NIW (M,C,d,S), where X/(Sigma) ~ N( M,C,(Sigma) ) -> a matrix normal distribution, (Sigma) -> column dispersion matrix (Sigma) ~ IW (d,S) -> inver

[R] Simulating from "matrix variate normal distribution"

2012-02-03 Thread Shantanu MULLICK
Hello everyone Is there a function/command to simulate from "matrix variate normal distribution" in R. A follow up question would be is there a function/command to obtain the density, distribution and quantile function of "matrix variate normal distribution" in R. Wikipedia has a good descriptio