function pa(dependent, vars, by, bottom, middle, top)
	if wgh == []
		W = ones(ncase, 1);
	else
		W = wgh;
	end

    bottom = str2num(bottom);
    middle = str2num(middle);
    top = str2num(top);
	dependent=ucase(dependent);
	vars=ucase(vars);
	if def(by) & size(by,1)
		ima_by = 1;
		by = ucase(by(1));
		[vals, f] = freq(DataGet(:, by));
	else
		ima_by = 0;
		vals = [1];
	end
	for i = 1 : size(vals, 1)
		if ima_by
			by_label = GetNumLabel(by, vals(i));
		else
			by_label = "Total";
		end
		heading(2, by_label);
		rL = [];
		rez1 = [];
		rez2 = [];
		for vi = 1 : prod(size(vars))
			if ima_by
				[DD, ind1] = DataGet(:, [dependent, vars(vi), by]);
				tot = sum(W(ind1(find(DD(:,3)==vals(i)))));
				ind2 = find(DD(:,3)==vals(i) & (DD(:,2) rin bottom));
			else
				[DD, ind1] = DataGet(:, [dependent, vars(vi)]);
				tot = sum(W(ind1));
				ind2 = find(DD(:,2) rin bottom);
			end
			if ind2~=[] & ind1(ind2) ~= []
				cnt1 = sum(W(ind1(ind2)));
				m1 = mean(DD(ind2, 1), W(ind1(ind2)));
				se1 = sqrt(sd(DD(ind2, 1), W(ind1(ind2)))^2 * cnt1/(cnt1-1)) / sqrt(cnt1);
				p1 = cnt1  / tot * 100;
			else
				cnt1 = NaN;
				m1 = NaN;
				se1 = NaN;
				p1 = NaN;
			end

			if ima_by
				ind2 = find(DD(:,3)==vals(i) & (DD(:,2) rin middle));
			else
				ind2 = find(DD(:,2) rin middle);
			end
			if ind2~=[] & ind1(ind2) ~= []
				cnt2 = sum(W(ind1(ind2)));
				m2 = mean(DD(ind2, 1), W(ind1(ind2)));
				se2 = sqrt(sd(DD(ind2, 1), W(ind1(ind2)))^2 * cnt2/(cnt2-1)) / sqrt(cnt2);
				p2 = cnt2  / tot * 100;
			else
				cnt2 = NaN;
				m2 = NaN;
				se2 = NaN;
				p2 = NaN;
			end
			
			if ima_by
				ind2 = find(DD(:,3)==vals(i) & (DD(:,2) rin top));
			else
				ind2 = find(DD(:,2) rin top);
			end
			if ind2~=[] & ind1(ind2) ~= []
				cnt3 = sum(W(ind1(ind2)));
				m3 = mean(DD(ind2, 1), W(ind1(ind2)));
				se3 = sqrt(sd(DD(ind2, 1), W(ind1(ind2)))^2 * cnt3/(cnt3-1)) / sqrt(cnt3);
				p3 = cnt3  / tot * 100;
			else
				cnt3 = NaN;
				m3 = NaN;
				se3 = NaN;
				p3 = NaN;
			end
			
			% print([cnt1,cnt2, cnt3])
			rL = [rL; GetVarLabel(vars(vi))];
			rez1 = [rez1; [p1, m1, se1, p2, m2, se2, p3, m3, se3]];

			math1 = 0;
			math2 = 0;
			math3 = 0;
			math4 = 0;
			math5 = 0;
			math6 = 0;
			sig1 = 1;
			sig2 = 1;

			math1 = m3 - m2;
			math2 = m1 - m2;

			math3 = sqrt((se2 * se2) + (se3 * se3));
			math4 = sqrt((se2 * se2) + (se1 * se1));

			if math3 > 0
				math5 = math1 / math3;
			end
			if math4 > 0
				math6 = math2 / math4;
			end

			if math5 >= 1.81 | math5 <= -1.81
				sig1 = .1;
			end
			if math5 >= 1.96 | math5 <= -1.96
				sig1 = .05;
			end

			if math6 >= 1.81 | math6 <= -1.81
				sig2 = .1;
			end
			if math6 >= 1.96 | math6 <= -1.96
				sig2 = .05;
			end
			rez2 = [rez2; [p2,m2,p3,math1,sig1,p1,math2,sig2]];
		end
		%print(rez1, rL, ["p1", "m1", "se1", "p2", "m2", "se2", "p3", "m3", "se3"])
		%print(rez2, rL, ["jrp", "jrm", "tp", "te", "sig", "lp", "le", "sig"])
		cL = ["Penalty (Too Low)", "Sig", "Too Low %", "Just Right %", "Too High %", "Penalty (Too High)", "Sig"];
		
		pl = num2str("%8.2f", rez2(:,7));
		sl = make(size(rez2,1),1,"");
		ind = find(rez2(:,8) <= 0.1);
		if ind ~= []
			sl(ind) = sl(ind) + "*";
		end
		ind = find(rez2(:,8) <= 0.05);
		if ind ~= []
			sl(ind) = sl(ind) + "*";
		end

		pt = num2str("%8.2f", rez2(:,4)); 
		st = make(size(rez2,1),1,"");
		ind = find(rez2(:,8) <= 0.1);
		if ind ~= []
			st(ind) = st(ind) + "*";
		end
		ind = find(rez2(:,8) <= 0.05);
		if ind ~= []
			st(ind) = st(ind) + "*";
		end
		D = [pl,  sl, num2str("%8.1f", rez2(:,6)), num2str("%8.1f", rez2(:,1)), num2str("%8.1f", rez2(:,3)),  pt, st];
		print(D, rL, cL);
	end %for
end