I have a table of values with each column being an instrument and each row being a time. Some instruments have not had data recorded at enough time values in order for me to fit a meaningful model.
I am attempting to use a loop to allow me to cycle through each column in turn and check the number of values.
I have some code which find the number of values for column 80.
col_a = Column(dt_2, 80);
val_mat = col_a << Get Values;
y = sum(!is missing(val_mat));
I am attempting to adapt this code into a loop for each column in turn and delete columns with too few values.
N_loop = N Cols(dt_2);
i_loop = 2;
While (i_loop <= N_loop,
col_loop = Column(dt_2, i_loop),
val_loop = col_loop << Get Values,
y_loop = sum(!is missing(val_loop)),
If(y_loop <= 8,
dt_2 << Delete Columns( i_loop ),
);
i_temp+=1,
);
The error message says too many arguments.