rettopnivek / seqmodels

A R package with density and distribution functions for common RT models.
MIT License
1 stars 0 forks source link

Problem installling 'seqmodels' on R 3.6.3 #1

Closed joshmanu closed 4 years ago

joshmanu commented 4 years ago

I have problems installing the 'seqmodels' package on R 3.6.3, year 2020, on a computer running Ubuntu 18.04.

I followed the instructions in the README file to install 'seqmodels' and first installed the prerequisites packages 'devtools', 'Rcpp', and 'RcppParallel'. Then:

devtools::install_github("rettopnivek/seqmodels")

which results in the following error message:

Error: package or namespace load failed for ‘seqmodels’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/home/manu/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-seqmodels/00new/seqmodels/libs/seqmodels.so': /home/manu/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-seqmodels/00new/seqmodels/libs/seqmodels.so: undefined symbol: gsl_integration_qags

Error: loading failed Execution halted ERROR: loading failed

ERROR: loading failed removing ‘/home/manu/R/x86_64-pc-linux-gnu-library/3.6/seqmodels’ Error: Failed to install 'seqmodels' from GitHub: (converted from warning) installation of package ‘/tmp/RtmpRh5hvo/file66fb60eabd42/seqmodels_0.0.0.9000.tar.gz’ had non-zero exit status

I checked whether it is (somehow) caused by my own installation of R, but 1) I can easily install other R packages from GitHub and 2) A colleague reproduced the same error when trying to install this package.

It seems to me that the package is not compatible with more recent versions of R.

Any help would be highly appreciated!

Best, Josh

rettopnivek commented 4 years ago

Hi Josh,

Thanks for reaching out to me! I've not updated the 'seqmodels' package for some time, so it does make sense that it's not currently compatible with recent versions of R. When I have time this week I'll look into getting the package back into working shape.

Best, Kevin

On Tue, Apr 7, 2020 at 6:03 AM Josh Salet notifications@github.com wrote:

I have problems installing the 'seqmodels' package on R 3.6.3, year 2020, on a computer running Ubuntu 18.04.

I followed the instructions in the README file to install 'seqmodels' and first installed the prerequisites packages 'devtools', 'Rcpp', and 'RcppParallel'. Then:

devtools::install_github("rettopnivek/seqmodels")

which results in the following error message:

Error: package or namespace load failed for ‘seqmodels’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object '/home/manu/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-seqmodels/00new/seqmodels/libs/seqmodels.so': /home/manu/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-seqmodels/00new/seqmodels/libs/seqmodels.so: undefined symbol: gsl_integration_qags

Error: loading failed Execution halted ERROR: loading failed

ERROR: loading failed removing ‘/home/manu/R/x86_64-pc-linux-gnu-library/3.6/seqmodels’ Error: Failed to install 'seqmodels' from GitHub: (converted from warning) installation of package ‘/tmp/RtmpRh5hvo/file66fb60eabd42/seqmodels_0.0.0.9000.tar.gz’ had non-zero exit status

I checked whether it is (somehow) caused by my own installation of R, but 1) I can easily install other R packages from GitHub and 2) A colleague reproduced the same error when trying to install this package.

It seems to me that the package is not compatible with more recent versions of R.

Any help would be highly appreciated!

Best, Josh

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rettopnivek/seqmodels/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTIPUMZ2NM6UQPXZNLS76LRLL25RANCNFSM4MC7KTIQ .

joshmanu commented 4 years ago

Hi Kevin,

I would kindly like to remind you about the above request. I am very sorry to bother you with it again. Probably, you are just very busy...

Hope to hear from you.

Best, Josh

On Tue, 7 Apr 2020 at 14:52, rettopnivek notifications@github.com wrote:

Hi Josh,

Thanks for reaching out to me! I've not updated the 'seqmodels' package for some time, so it does make sense that it's not currently compatible with recent versions of R. When I have time this week I'll look into getting the package back into working shape.

Best, Kevin

On Tue, Apr 7, 2020 at 6:03 AM Josh Salet notifications@github.com wrote:

I have problems installing the 'seqmodels' package on R 3.6.3, year 2020, on a computer running Ubuntu 18.04.

I followed the instructions in the README file to install 'seqmodels' and first installed the prerequisites packages 'devtools', 'Rcpp', and 'RcppParallel'. Then:

devtools::install_github("rettopnivek/seqmodels")

which results in the following error message:

Error: package or namespace load failed for ‘seqmodels’ in dyn.load(file, DLLpath = DLLpath, ...): unable to load shared object

'/home/manu/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-seqmodels/00new/seqmodels/libs/seqmodels.so':

/home/manu/R/x86_64-pc-linux-gnu-library/3.6/00LOCK-seqmodels/00new/seqmodels/libs/seqmodels.so: undefined symbol: gsl_integration_qags

Error: loading failed Execution halted ERROR: loading failed

ERROR: loading failed removing ‘/home/manu/R/x86_64-pc-linux-gnu-library/3.6/seqmodels’ Error: Failed to install 'seqmodels' from GitHub: (converted from warning) installation of package ‘/tmp/RtmpRh5hvo/file66fb60eabd42/seqmodels_0.0.0.9000.tar.gz’ had non-zero exit status

I checked whether it is (somehow) caused by my own installation of R, but 1) I can easily install other R packages from GitHub and 2) A colleague reproduced the same error when trying to install this package.

It seems to me that the package is not compatible with more recent versions of R.

Any help would be highly appreciated!

Best, Josh

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rettopnivek/seqmodels/issues/1, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ADTIPUMZ2NM6UQPXZNLS76LRLL25RANCNFSM4MC7KTIQ

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rettopnivek/seqmodels/issues/1#issuecomment-610368237, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKAP26755H6VXLT7P3WMWELRLMOYRANCNFSM4MC7KTIQ .

rettopnivek commented 4 years ago

Hello Josh,

Thank you for the reminder! I have been busy - my apologies for the delay, and thanks again for your patience. I've gotten the package to work again on a Windows 10 machine, and I can reproduce your error on a Ubuntu 18.04 LTS install. However, I am still figuring out how to fix the error for the Ubuntu install. It looks like an issue with the library for the numeric integration features.

I will continue to work on this and keep you up-to-date on my progress. In the interim, a work-around may be to try to install 'seqmodels' on a Windows 10 machine, if this is an option available to you.

joshmanu commented 4 years ago

Hi Kevin,

Thanks for the efforts! It seems like a nasty error. Unfortunately, I don't have a Windows 10 machine at home and I can't go to the office anymore.

I'll be patient before I start to find a way to work around it. Anyway, thanks again (seriously)!

Best, Josh

On Thu, 16 Apr 2020 at 17:15, rettopnivek notifications@github.com wrote:

Hello Josh,

Thank you for the reminder! I have been busy - my apologies for the delay, and thanks again for your patience. I've gotten the package to work again on a Windows 10 machine, and I can reproduce your error on a Ubuntu 18.04 LTS install. However, I am still figuring out how to fix the error for the Ubuntu install. It looks like an issue with the library for the numeric integration features.

I will continue to work on this and keep you up-to-date on my progress. In the interim, a work-around may be to try to install 'seqmodels' on a Windows 10 machine, if this is an option available to you.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rettopnivek/seqmodels/issues/1#issuecomment-614716185, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKAP265Y6IPE5TOJZCLVRHDRM4OIBANCNFSM4MC7KTIQ .

rettopnivek commented 4 years ago

Hi Josh,

Hope you are doing well during these trying times! I think the long-term solution to this issue will be to rebuild the package to use the add-on Rcpp packages for the GSL and Fadeeva libraries, will will be much more likely to work with all OS types, as they were written by actual programmers!

This will take some time, so I thought I should check in with you to learn what specific functionalities from the seqmodel package you needed - depending on what you need, I may be able to put together a early build that solves your problems in a more timely fashion.

Best, Kevin

joshmanu commented 4 years ago

Hi Kevin,

Thanks!

I would like to fit different SW models to the data. These models differ with regard to the SW's parameters that are free to vary as a function of my variable of interest. Thus, an all-free model where drift, threshold, and non-decision (nd) are allowed to vary and the other models in which either the drift, threshold or nd are fixed. I would like to fit those models using maximum likelihood estimation and compare their performance by the log-likelihood.

So why specifically your package? I struggled with the other packages (e.g., 'SuppDist' or 'Wald') as for these, as far as I know, the density SW function is recovered by mu and lambda. The problem is that I don't know how to separately fix the drift or threshold as mu = threshold/drift. I tried different ways of working my way around it but wasn't successful. That's why I started looking for another package and found yours, where, in contrast to those other packages, the SW density function can be obtained by setting a threshold (kappa), drift rate (x1), and non-decision time (tau) separately.

Thus, most likely I am especially going to rely on the functions "dinvgauss" & "qinvgauss".

I hope that makes sense, this is my first SW fitting procedure, so I am not entirely sure if the problem described above is a "real" problem. If you think it isn't, it would be also good to know!

Best, Josh

On Tue, 21 Apr 2020 at 02:29, rettopnivek notifications@github.com wrote:

Hi Josh,

Hope you are doing well during these trying times! I think the long-term solution to this issue will be to rebuild the package to use the add-on Rcpp packages for the GSL and Fadeeva libraries, will will be much more likely to work with all OS types, as they were written by actual programmers!

This will take some time, so I thought I should check in with you to learn what specific functionalities from the seqmodel package you needed - depending on what you need, I may be able to put together a early build that solves your problems in a more timely fashion.

Best, Kevin

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rettopnivek/seqmodels/issues/1#issuecomment-616879745, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKAP26ZDLFJNCAHQKHM2T6TRNTSHHANCNFSM4MC7KTIQ .

rettopnivek commented 4 years ago

Okay! This is good news - the inverse gaussian functions do not rely on the GSL or Fadeeva libraries, so I can simplify the package for the time being and remove anything that uses those libraries. I'll try to have this updated by this upcoming Friday, feel free to reach out if you don't hear anything from me.

One recommendation I would make is to use a robust variant of the shifted inverse gaussian (SIG) model, specifically a mixture of a uniform distribution and the SIG distribution. The reason for this is that the non-decision time component is very sensitive to outliers, particularly overly fast anticipatory responses. I can provide a simple example of fitting this type of mixture distribution if need be.

rettopnivek commented 4 years ago

Hi Josh,

I've trimmed the functionality needing the GSL and Fadeeva libraries, leaving a smaller set of functions. The shifted Wald distribution is one of the functions still included in the package. I've confirmed that installation works on my version of Ubuntu 18.04 LTS. Let me know if it works for you!

Later this week I will try to put together a vignette to include with the package that details fitting the shifted Wald using a maximum likelihood approach.

Best, Kevin

joshmanu commented 4 years ago

Hi Kevin,

It works (the installation and a quick run of the 'invgauss' functions). Major thanks for all the efforts!

Later this week I will try to put together a vignette to include with the package that details fitting the shifted Wald using a maximum likelihood approach.

That would be very much appreciated! I am looking forward to that. Thanks for all your help with this.

Best,

Josh

On Thu, 23 Apr 2020 at 01:42, rettopnivek notifications@github.com wrote:

Hi Josh,

I've trimmed the functionality needing the GSL and Fadeeva libraries, leaving a smaller set of functions. The shifted Wald distribution is one of the functions still included in the package. I've confirmed that installation works on my version of Ubuntu 18.04 LTS. Let me know if it works for you!

Later this week I will try to put together a vignette to include with the package that details fitting the shifted Wald using a maximum likelihood approach.

Best, Kevin

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rettopnivek/seqmodels/issues/1#issuecomment-618094736, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKAP265XLCCGHUC5M77KAJ3RN56FVANCNFSM4MC7KTIQ .

rettopnivek commented 4 years ago

Hello Josh,

I've updated the package again, adding a vignette with an in-depth example of conducting maximum likelihood estimation with the shifted inverse Gaussian. If everything is working properly for you, let me know, and I will go ahead and close this issue.

Best, Kevin

joshmanu commented 4 years ago

Hi Kevin,

All works perfectly fine. I have been working already with the trimmed functionalities throughout the weekend. This morning I have been going through your in-depth vignette. That is very helpful. So yes, you can close this issue.

Quick question. Is your proposed suggestion for handling outliers (shited inverse gauss + uniform distribution) a common approach when working with the Wald? Is there a way I can refer to it, for example, cite you? Perhaps you have a paper where you use this approach or what would be the best way to acknowledge you referring to the "seqmodels" package? I still need to work out all the details so not sure if it is going to be used for me, but just in case!

Big thanks! It is great to know that there are people out there that offer (almost) unlimited help! This was an awesome experience :)

Thanks

Best, Josh

On Mon, 27 Apr 2020 at 22:07, rettopnivek notifications@github.com wrote:

Hello Josh,

I've updated the package again, adding a vignette with an in-depth example of conducting maximum likelihood estimation with the shifted inverse Gaussian. If everything is working properly for you, let me know, and I will go ahead and close this issue.

Best, Kevin

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rettopnivek/seqmodels/issues/1#issuecomment-620205560, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKAP266TDEDACQOTP6IVWTTROXQZPANCNFSM4MC7KTIQ .

rettopnivek commented 4 years ago

Wonderful, I'm glad I could be of help! Thanks so much for using my package!

My example with the mixture distribution is not common (by far the trimming method is the most common). I do have a published article where I've used the mixture approach, and I've also included two papers with my advisor that use a more complicated mixture approach (typically a three component mixture model with separate distributions for fast and slow responses). However, for simple models and data, the trimming approach is generally fine, so don't feel pressured to use this mixture approach!

  1. Example of mixture approach (see section 4.2, page 11): https://www.researchgate.net/profile/Chris_Donkin/publication/321833262_The_elimination_of_positive_priming_with_increasing_prime_duration_reflects_a_transition_from_perceptual_fluency_to_disfluency_rather_than_bias_against_primed_words/links/5dcd08bb299bf1b74b3f65c4/The-elimination-of-positive-priming-with-increasing-prime-duration-reflects-a-transition-from-perceptual-fluency-to-disfluency-rather-than-bias-against-primed-words.pdf))
  2. Papers with separate mixtures for fast and slow responses: "A Bayesian race model for response times under cyclic stimulus discriminability" and "A Bayesian race model for recognition memory".

Hope this helps! Kevin