how to write rules in .est

296 views
Skip to first unread message

Chen Ming

unread,
Oct 16, 2014, 6:24:37 PM10/16/14
to fasts...@googlegroups.com
Dear Laurent and discussion group,

I used fsc to estimate demographic parameters from SFS. I put some rules into the .est file, like below: 

// Priors and rules file
// *********************
[PARAMETERS]
//#isInt? #name #dist.#min #max
//all Ns are in number of haploid individuals
1 N0 logunif 2e5 2e7 output bounded
1 N1 logunif 2e5 2e7 output  bounded
1 N2 logunif 2e5 2e7 output        bounded

[RULES]
N0 > N1
N0 > N2

[COMPLEX PARAMETERS]

But after 100 runs, some estimations of N1 are still larger than N0. Why did this happen? Is there any particular format needed to write the rule part of .est file? 

Best,
Chen

Laurent Excoffier

unread,
Oct 18, 2014, 4:14:24 AM10/18/14
to fasts...@googlegroups.com
I cannot replicate your problem. Your est file looks fine to me.

Can you send the tpl, est, and obs file as well as the command line you used?

L

Message has been deleted

Laurent Excoffier

unread,
Oct 22, 2014, 9:18:34 AM10/22/14
to fasts...@googlegroups.com
Hi Chen,

ok, I see. I still cannot replicate your problem by launching a few runs. I'd really need the seed of the runs leading to your problematic cases to look for the problem.

As a workaround, you could parameterize your model a bit differently by using complex parameters rather than rules, and it should always work.

What you can do is to declare N1 and N2 as complex parameter like:

N1=frac1*N0 output
N2=frac2*N0 output

and declare frac1 and frac2 as normal parameters as
0 frac1 0 1 hide bounded
0 frac2 0 1 hide bounded

So frac1 and frac2 will always be between 0 and 1 and therefore N1 and N2 will always be smaller than N0.

Hope it helps

laurent

Chen Ming

unread,
Oct 23, 2014, 12:56:13 PM10/23/14
to fasts...@googlegroups.com
Hi Laurent,
Thanks for your suggestion. That's very helpful. Below is the seed which will generate the wrong estimations:
Random generator seed :631927
Random generator seed :910382
Random generator seed :4749
Random generator seed :908368
Random generator seed :351907
Random generator seed :193972
Random generator seed :876759
Random generator seed :719989
Random generator seed :938597
Random generator seed :105766
Random generator seed :618284
Random generator seed :938821
Random generator seed :354754


Best,
Chen

Laurent Excoffier

unread,
Nov 12, 2014, 2:56:07 AM11/12/14
to fasts...@googlegroups.com
I will have a look,thanks for the seeds
L
Reply all
Reply to author
Forward
0 new messages