private String reportIfContinuous(Graph dag, DataSet dataSet) { SemPm semPm = new SemPm(dag); SemEstimator estimator = new SemEstimator(dataSet, semPm); estimator.estimate(); SemIm semIm = estimator.getEstimatedSem(); NumberFormat nf = NumberFormat.getInstance(); nf.setMaximumFractionDigits(4); StringBuilder buf = new StringBuilder(); buf.append("\nDegrees of Freedom = ") .append(semPm.getDof()) .append("Chi-Square = ") .append(nf.format(semIm.getChiSquare())) .append("\nP Value = ") .append(nf.format(semIm.getPValue())) .append("\nBIC Score = ") .append(nf.format(semIm.getBicScore())); buf.append( "\n\nThe above chi square test assumes that the maximum " + "likelihood function over the measured variables has been " + "maximized. Under that assumption, the null hypothesis for " + "the test is that the population covariance matrix over all " + "of the measured variables is equal to the estimated covariance " + "matrix over all of the measured variables written as a function " + "of the free model parameters--that is, the unfixed parameters " + "for each directed edge (the linear coefficient for that edge), " + "each exogenous variable (the variance for the error term for " + "that variable), and each bidirected edge (the covariance for " + "the exogenous variables it connects). The model is explained " + "in Bollen, Structural Equations with Latent Variable, 110. "); return buf.toString(); }