HyPhy message board
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl
Methodology Questions >> How to >> correct syntax for global parameters
http://www.hyphy.org/cgi-bin/hyphy_forums/YaBB.pl?num=1152553546

Message started by Jennifer Knies on Jul 10th, 2006 at 10:45am

Title: correct syntax for global parameters
Post by Jennifer Knies on Jul 10th, 2006 at 10:45am
Hi,
In my batch file, I want to set alpha equal to some value, yet still have a "global" alpha.  When I use the following syntax:

global alpha = 0.2289;

HYPHY estimates alpha (which I don't want it to do).  If I instead have:

alpha = 0.2289;

HYPHY does not estimate alpha (good), but I am not sure if I have inadvertently made alpha local or is it still global.  Thanks,
Jen

Title: Re: correct syntax for global parameters
Post by Sergei on Jul 10th, 2006 at 10:51am
Dear Jen,

The correct syntax for what you want to do is either


Code (]
global alpha := 0.2289;
[/code):



or

[code]
global alpha;
alpha := 0.2289;


Note the use of the 'assign' operator (':=') to impose a constraint on alpha.

If you use,
[code]
alpha = 0.2289;
[/code]
then most likely alpha is made into a local variable and optimized (which you do not want), or simply ignored, if it's dependancy can't be followed from the model definition (which you also don't want).

Cheers,
Sergei

HyPhy message board » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2024. All Rights Reserved.