Hello,
The program works well with GAUSS default parameter starting values, but when I supplied the starting value, it shows the following error:
“OL: Covariances could not be computed because the Hessian could not be computed. This may be the result of poor scaling or ill-conditioning.”
I am worried whether I put the starting values and mask's elements incorrectly?
I have three independent variables (X1, X2, X3) and binary dependent variable (Y).
I use starting values (1.5, 0.143,.0882, 0.2853) in the following ways:
//Set parameter start values
//Set b0, dimensions must be equal to one by the number of Y categories
//Y is binary ( 2 categories, 1x2 matrix for b0)
b0 = {0 1.5};
//Set coefficient start values, dimensions must be equal to number
//of independent variables by number of Y categories
//Three independent variables (3 x 2 matrix for coefficients)
b = {0 .143, .0882 .2853, 0 0};
mask = {0 1, 1 1, 0 0};
//Pack parameter values
cont.startValues = pvPackmi(cont.startValues, b0 ,"b0", mask[1,.] , 1);
cont.startValues = pvPackmi(cont.startValues , b ,"b", mask, 2);
Does the matrix form for mask look correct?
I got the error message due to the matrix representation of "mask".
Any suggestions are really appreciated!
Thanks,
2 Answers
0
Hi Taylor,
As your intuition suggests the error is likely coming from the setup of the b and mask matrices. When setting start values for the discrete choice models using the cont.startValues parameter the matrices and the mask used should reflect the reference category you desire. If you do not specify a reference category, then the first category is used as a reference category. In order to account for the reference category in the start values, all values of the matrices packed into cont.startValues which correspond to the reference category should be equal to zero. I suggest rearranging b and mask:
//Set coefficient start values, dimensions must be equal to number //of independent variables by number of Y categories //Three independent variables (3 x 2 matrix for coefficients) b = {0 .143, 0 .0882, 0 .2853}; mask = {0 1, 0 1, 0 1};
0
Hello eclower,
Thanks for the answer. It worked, but still I have some questions.
When I used starting values in the new DC version (2.0.3), it worked. I wonder whether "mask" is working correctly?
For the above starting values, if I use "mask" in the following way, it still works. I was expecting error because it is not a logical way to use values in "mask".
Why did it work? Why did not I get any error message?
I used mask in different ways: still worked.
mask = {1 1,
1 1,
1 1};
or
mask = {1 0,
1 1,
1 0};
or
mask = {1 0,
1 1,
1 0};
Thanks,
Taylor
Your Answer
2 Answers
Hi Taylor,
As your intuition suggests the error is likely coming from the setup of the b and mask matrices. When setting start values for the discrete choice models using the cont.startValues parameter the matrices and the mask used should reflect the reference category you desire. If you do not specify a reference category, then the first category is used as a reference category. In order to account for the reference category in the start values, all values of the matrices packed into cont.startValues which correspond to the reference category should be equal to zero. I suggest rearranging b and mask:
//Set coefficient start values, dimensions must be equal to number //of independent variables by number of Y categories //Three independent variables (3 x 2 matrix for coefficients) b = {0 .143, 0 .0882, 0 .2853}; mask = {0 1, 0 1, 0 1};
Hello eclower,
Thanks for the answer. It worked, but still I have some questions.
When I used starting values in the new DC version (2.0.3), it worked. I wonder whether "mask" is working correctly?
For the above starting values, if I use "mask" in the following way, it still works. I was expecting error because it is not a logical way to use values in "mask".
Why did it work? Why did not I get any error message?
I used mask in different ways: still worked.
mask = {1 1,
1 1,
1 1};
or
mask = {1 0,
1 1,
1 0};
or
mask = {1 0,
1 1,
1 0};
Thanks,
Taylor