Small bugs fixing in a R code using hiearchical bayesian statistics

  • Status: Pending
  • Prize: $40
  • Entries Received: 0

Contest Brief

The attached code in R uses Hierarchical Bayesian statistics to generate an excel file for an adaptative questionnaire. See http://www.insead.edu/facultyresearch/research/doc.cfm?did=44772 for more information on hte algorithm.

The code is not working right know as there are some bugs. The task will be to:
1) fix the bugs
2) add a constraint on the variable pi which should be positive and with initial value 0.9
3) clean and document the code
4) generate the table

Here is the error msg I get:
Erreur dans if (thevaluecand < thevalue) { :
valeur manquante là où TRUE / FALSE est requis

Recommended Skills

Public Clarification Board

  • ducvt71
    ducvt71
    • 8 years ago

    Erreur dans if (thevaluecand < thevalue) { :
    valeur manquante là où TRUE / FALSE est requis. Your error is because thevaluecand is NA. So it would be like that if (!is.na(thevaluecand))) { if (thevaluecand < thevalue) {...}.

    • 8 years ago

How to get started with contests

  • Post your contest

    Post Your Contest Quick and easy

  • Get tons of entries

    Get Tons of Entries From around the world

  • Award the best entry

    Award the best entry Download the files - Easy!

Post a Contest Now or Join us Today!