X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fmcnemar.c;h=dbe5813ae48ab7beca5fbd5d4d97349699aa952a;hb=96994a54e60e9c95b8bba54c2281acf7059b1203;hp=7ee52f43134afdc018548b88ff25f3e0eb0d8be3;hpb=369c24f1d085a41ec274ebae5fc198fcee567653;p=pspp diff --git a/src/language/stats/mcnemar.c b/src/language/stats/mcnemar.c index 7ee52f4313..dbe5813ae4 100644 --- a/src/language/stats/mcnemar.c +++ b/src/language/stats/mcnemar.c @@ -85,7 +85,7 @@ mcnemar_execute (const struct dataset *ds, struct mcnemar *mc = xcalloc (t2s->n_pairs, sizeof *mc); - for (i = 0 ; i < t2s->n_pairs; ++i ) + for (i = 0 ; i < t2s->n_pairs; ++i) { mc[i].val0.f = mc[i].val1.f = SYSMIS; } @@ -94,7 +94,7 @@ mcnemar_execute (const struct dataset *ds, { const double weight = dict_get_case_weight (dict, c, &warn); - for (i = 0 ; i < t2s->n_pairs; ++i ) + for (i = 0 ; i < t2s->n_pairs; ++i) { variable_pair *vp = &t2s->pairs[i]; const union value *value0 = case_data (c, (*vp)[0]); @@ -107,7 +107,7 @@ mcnemar_execute (const struct dataset *ds, continue; - if ( mc[i].val0.f == SYSMIS) + if (mc[i].val0.f == SYSMIS) { if (mc[i].val1.f != value0->f) mc[i].val0.f = value0->f; @@ -115,7 +115,7 @@ mcnemar_execute (const struct dataset *ds, mc[i].val0.f = value1->f; } - if ( mc[i].val1.f == SYSMIS) + if (mc[i].val1.f == SYSMIS) { if (mc[i].val0.f != value1->f) mc[i].val1.f = value1->f; @@ -127,15 +127,15 @@ mcnemar_execute (const struct dataset *ds, { mc[i].n00 += weight; } - else if ( mc[i].val0.f == value0->f && mc[i].val1.f == value1->f) + else if (mc[i].val0.f == value0->f && mc[i].val1.f == value1->f) { mc[i].n10 += weight; } - else if ( mc[i].val1.f == value0->f && mc[i].val0.f == value1->f) + else if (mc[i].val1.f == value0->f && mc[i].val0.f == value1->f) { mc[i].n01 += weight; } - else if ( mc[i].val1.f == value0->f && mc[i].val1.f == value1->f) + else if (mc[i].val1.f == value0->f && mc[i].val1.f == value1->f) { mc[i].n11 += weight; }