Author Topic: Entering Likelihood as data  (Read 16536 times)

Offline bill.raynor

  • Newbie
  • *
  • Posts: 10
    • View Profile
Entering Likelihood as data
« on: July 13, 2012, 17:12:23 »
The data files section of the Hugin manual seems to imply that data can only be exact:

     <Data> ::= <Value> | N/A | <Empty>
     <Value> ::= <State index> | <Label> | <Real number> | true | false

Is there any way to enter any of the various forms of  soft and likelihood/statistical evidence other than faking it with the "case count" field?

For example: I observe an observation that has where one of the variables is observed inexactly as being in state 1 with probability p1 and state 2 with probability p2, or if I am modeling something like genotypes and want to enter data based on phenotypes (e.g. observing a phenotype eliminates certain genotypes). I realize that the one dodge is to add another layer of observation or virtual nodes. I am trying to avoid that...

Offline Martin

  • HUGIN Expert
  • Hero Member
  • *****
  • Posts: 613
    • View Profile
Re: Entering Likelihood as data
« Reply #1 on: July 17, 2012, 10:33:35 »
The data file format does not support likelihood.

But the HUGIN case file format does support likelihood, perhaps this could be useful for you.
Note these are two different file formats, as data files may contain many cases per file, case files only store a single case per file

Section 8.9 in the API reference manual (the pdf) describes the case file format.
Hugin Expert A/S

Offline bill.raynor

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Entering Likelihood as data
« Reply #2 on: July 19, 2012, 16:34:35 »
Thank you. I never realized that there were two different formats.

Offline andersrm

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Entering Likelihood as data
« Reply #3 on: November 21, 2012, 07:48:11 »
Yes, but as far as I can tell from looking at the online help manual, there are no obvious instructions for how you would use the case file format to enter likelihood data.  What am I missing?

andersrm

Offline Anders L Madsen

  • HUGIN Expert
  • Hero Member
  • *****
  • Posts: 2295
    • View Profile
Re: Entering Likelihood as data
« Reply #4 on: November 21, 2012, 15:07:35 »
You can save and load a case file using the menu items File->Save case ... and File->Load case ..., respectively.

The syntax of case files is described in Section 8.9 of the HUGIN API Reference Manual. This example is taken from the manual:

Code: [Select]
A: "yes"
B: #1        % equivalent to "no"
C: (.3 1.2) % likelihood

Hope this helps
HUGIN EXPERT A/S