protected GLM getGLM(int p, int[][] attrs, double[][] coef, double intercept, LinkFunction link) {
		GLM glm = new GLM(p);
		double[] w = glm.coefficients(0);
		for (int g = 0; g < attrs.length; g++) {
			int[] attr = attrs[g];
			double[] beta = coef[g];
			for (int j = 0; j < attr.length; j++) {
				w[attr[j]] = beta[j];
			}
		}
		glm.intercept[0] = intercept;
		glm.link = link;
		return glm;
	}