Welcome, Guest. Please Login
YaBB - Yet another Bulletin Board
 
  HomeHelpSearchLogin  
 
correct syntax for global parameters (Read 2037 times)
Jennifer Knies
Guest


correct syntax for global parameters
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
Back to top
 
 
IP Logged
 
Sergei
YaBB Administrator
*****
Offline


Datamonkeys are forever...

Posts: 1658
UCSD
Gender: male
Re: correct syntax for global parameters
Reply #1 - Jul 10th, 2006 at 10:51am
 
Dear Jen,

The correct syntax for what you want to do is either

Code:
global alpha := 0.2289;
 



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;
 


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
Back to top
 

Associate Professor
Division of Infectious Diseases
Division of Biomedical Informatics
School of Medicine
University of California San Diego
WWW WWW  
IP Logged