Vumani Dlamini wrote:> Dear listers,
> Am currently using MCMC approaches to estimate some parameters of my model.
> One parameter has to be updated using a tuned gamma distribution. So at
each
> iteration I estimate the mean and variance of the density of the gamma
> approximation using "vmmin" (i also supply the gradient
argument). For
> moderate replications the procedure works, but if I increase them R
crashes.
> If instead of the tuned gamma density i use the adaptive rejection sampling
> procedure by Gilks and Wild (downloaded from their website) the procedure
> returns the results for any number of replications, thus I suspected that
> there was a memory leak in "vmmin". I am not an expert in
"C" and am only a
> windows user. Have tried some of the debugging tools available to us
windows
> users: gdb, mpatrol, duma without success. Am not sure whether this is a
> bug.
>
> Version 2.3.1 (2006-06-01)
> Windows XP
>
> Regards, Vumani
>
>
>
> Rgui.exe caused an Access Violation at location 100dec2f in module R.dll
> Reading from location 3ff7c27d.
>
> Registers:
> eax=000063ac ebx=01e773a0 ecx=3ff7c27a edx=00000002 esi=01e254b4
> edi=00000002
> eip=100dec2f esp=00e0ecb0 ebp=00e0ed78 iopl=0 nv up ei pl nz na pe
> nc
> cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000
> efl=00000202
>
> Call stack:
> 100DEC2F R.dll:100DEC2F SET_TAG
> 100E0527 R.dll:100E0527 Rf_allocVector
> 100E0D37 R.dll:100E0D37 R_alloc
> 100F2ACA R.dll:100F2ACA vmmin
> 023F5E96 gem.dll:023F5E96 weibullMH
> 10088C33 R.dll:10088C33 do_dotcall
> 100B8827 R.dll:100B8827 Rf_eval
> 100BA4D2 R.dll:100BA4D2 do_set
> 100B86CB R.dll:100B86CB Rf_eval
> 100BA5D5 R.dll:100BA5D5 do_begin
> 100B86CB R.dll:100B86CB Rf_eval
> 100BB8EB R.dll:100BB8EB Rf_applyClosure
> 100B85F8 R.dll:100B85F8 Rf_eval
> 100BA4D2 R.dll:100BA4D2 do_set
> 100B86CB R.dll:100B86CB Rf_eval
> 100DB51C R.dll:100DB51C Rf_ReplIteration
> 100DBAA6 R.dll:100DBAA6 run_Rmainloop
> 004013CF Rgui.exe:004013CF
> 00401316 Rgui.exe:00401316
> 00401518 Rgui.exe:00401518
> 00401236 Rgui.exe:00401236
> 00401288 Rgui.exe:00401288
> 7C816D4F kernel32.dll:7C816D4F RegisterWaitForInputIdle
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html
It's not clear to my why you suspect "vmmin" (aka BFGS) rather
than how
you are using said function? Can you provide a re-producible example as
the posting guide asks?
Also, are you using "optim" in R? Or are you calling vmmin from
C-code?
Again, an example would clear up many of the questions you have asked.
--sundar