Skip to content

Determinant of IM is 0 when using small number of choice sets or alternatives #6

Description

@DinosaurusAlbert

The script works perfect when I set NCS to a high number (i.e. 10) and have at least 3 alternatives per choice set. However for the current study I want to do a small pilot with just a few choice sets. When I set NCS to 3, or the number of alts per choice set to two, the script does not work. This is the error I am getting:

  File ~\mypath\choicedesign\criteria.py:34 in _derr
    return dr,vce

UnboundLocalError: cannot access local variable 'vce' where it is not associated with a value. 

I have looked around in the code and it seems that the determinant of the fisher information matrix that is returned by getValueAndDerivatives for some reason equals 0 when using few alternatives/choice sets. I have little training in the statistics used here, so it could be that there is a substantial non-code related reason for this. Does any body have any pointers here? As I said, when using a larger number of alternatives/choice sets, the code works fine because the determinant of the initial design information matrix is not 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions