Model_Name  		= "F81";
Model_Options 		= 6;
Model_Dimension 	= 2;
Model_EFV_Type		= "Observed In Partition";

/*-------------------------------------------------------------------------------*/

function GUIPopulateModelMatrix (ModelMatrixName&, EFV)
{
	if (modelType == 0)
	{
		ModelMatrixName = {{*,t}
						   {t,*}};
	}
	else
	{
		global shapeParameter = .5;
		shapeParameter:>0.01;shapeParameter:<100;
		category     categoryVariable = 
					(rateClassCount, EQUAL, MEAN, GammaDist(_x_,shapeParameter,shapeParameter), CGammaDist(_x_,shapeParameter,shapeParameter), 0 , 
			  							1e25,CGammaDist(_x_,shapeParameter+1,shapeParameter));
			  							
		ModelMatrixName = {{*,t*categoryVariable}
						   {t*categoryVariable,*}};
	}
	return 1;
}

/*-------------------------------------------------------------------------------*/

function	EFVEstimated	(EFVector&, EFVApproximations)
{
	global frequencyVariable0;
	global frequencyVariable1;

	frequencyVariable0:<1;
	frequencyVariable1	 :=	1-frequencyVariable0;

	frequencyVariableA = EFVApproximations[0];

	EFVector = {{frequencyVariable0},
				{frequencyVariable1}};
				
	return	1;
}
