PDA

View Full Version : Help with CategoricalGenLinModel



Timores
02-14-2011, 08:28 AM
Hi,

I am a newbie in statistics and am having trouble using the CategoricalGenLinModel with the probit method.

I have a series of observations, with n measures for each. I'd like to relate these n measures with a fact.

I created a double[,] array, with as many rows as I have observations. I've set the first n columns of the arrays to the measures and (n + 1)th column to the fact value.
The result of calling Solve() is an array with a single row, as if there is only one measure.

My problem is that I don't understand the terminology behind the documentation. What should I set the properties of my CategoricalGenLinModel instance to, such that it considers the first n columns as measures (or coefficients as the docs of Solve() says) ?

Thanks in advance,
Jean-Marie Pirelli

Timores
02-15-2011, 07:37 AM
I used the SetEffects function to set the columns that are "measures".

If I have 4 columns in the x array, where columns 0, 1 and 2 are the measures, I call:

int[] nvef = new int[]{1, 1, 1};
int[] indef = new int[]{0, 1, 2};
CATGLM4.SetEffects(indef, nvef);

Now, I get 3 rows for Solve() and 4 rows if I set ModelIntercept = 1. Which seems OK to me.

tds
02-16-2011, 09:47 AM
Yes, you do need to use SetEffects to specify the columns. Your input to SetEffects looks correct.