[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

categorical variables again

From: Jason Stover
Subject: categorical variables again
Date: Mon, 31 Oct 2005 21:07:24 +0000
User-agent: Mutt/

While we're on the topic of caching: Would anyone mind if I put a
gsl_matrix (or just an int **) and a union value * inside the variable
struct? Like this, in variable.h:

struct variable
        union value *vals; /* Values of the variable, if that variable
                              has type ALPHA.
        gsl_matrix *cv;    /* Matrix that holds binary-encoded values
                              of a categorical variable. For use in
                              estimation routines that require vectors.
                              The ith row of the matrix holds the ith
                              value of the variable, as stored in 'vals'.

A procedure that passes through the data and encodes a categorical
variable stores the encoding in the variable structure. Then another
procedure can use that encoding. We had a discussion about this earlier.
The problem is: What to do if someone alters the variable by recoding.
(The gsl_matrix and union * should be destroyed, I think.)

I'm willing to put this in, but I am slightly afraid of botching
someone else's code.


SDF Public Access UNIX System -

reply via email to

[Prev in Thread] Current Thread [Next in Thread]