public string sstars(CorrPValueMode mode) { string stars = ""; if (spearman_pvalue < .001) { stars = "***"; } else if (spearman_pvalue < .01) { stars = "** "; } else if (spearman_pvalue < .05) { stars = "* "; } string output = ""; if (mode == CorrPValueMode.StarsOnly) { output = stars; } else if (mode == CorrPValueMode.CorrWithStars) { output = String.Format("rho={0:.00}{1}", spearman, stars); } else if (mode == CorrPValueMode.CorrWithPValue) { output = String.Format("rho={0:.00} p={1:.0000}", spearman, spearman_pvalue); } return(output); }
public string results(CorrPValueMode mode) { bool OnlyNonparametricIsSig = this.nonparametricEffect(); if (OnlyNonparametricIsSig) { string pstars1 = pstars(CorrPValueMode.CorrWithPValue); string sstars1 = sstars(CorrPValueMode.CorrWithPValue); string tmp = String.Format("{0}, {1}", pstars1, sstars1); return(tmp); } else { return(pstars(mode)); } }