I am using the gnm
function in R. I am trying to fit a model with an integral portion which I have discretized by using six matrices whose columns are a binary indicator for that covariate at each time interval. Each of these columns is labelled with a1, a2
, etc. for matrix 1, b1, b2
, etc. for matrix 2, and so on. I have about 250 columns for each of these matrices.
I am passing these matrices to the gnm command as a string:
mod<-gnm(as.formula(expr),family=binomial)
where expr
is a character string that contains the list of all of the matrix column variable names (i.e., a1, a2, ..., b1, b2, ....
).
My code produces sensible results when I use 5 matrices but when I try to use 6 matrices I get the following error when I try to run the gnm
command.
variable names are limited to 10000 bytes
Is there a way to bypass this?