% Example: analyze testdata.txt using gPOCRE

yx = load('testdata.txt');
y = yx(:,1);
x = yx(:,2:end);
[xx,xxidx] = Standardize(x);    % Standardizing all covariates
option.maxit = 50;      % maximum number of iterations
option.ptype = 'l1';    % penalty type, other choices: 'ebtz', 'scad'
option.covidx = [15 16];    % covariates of no interest
res = gPOCREPath(y,xx,'binomial','logit',option);
save('exampleres.mat','res');
resp25 = SelectModel(res,0.25);
disp(['EBIC(gamma=0.25): #[beta~=0] = ' num2str(sum(abs(resp25.beta)>0))]);
disp(['p-values of components:' num2str(resp25.pvalue)]);
disp(['Sequential p-values of components:' num2str(resp25.seqpv)]);
disp(['p-values of individual components:' num2str(resp25.indpv)]);
