How to Conduct a Two-Sample KS Test using Proc NPAR1WAY procedure?

Reply
Occasional Contributor
Posts: 5

How to Conduct a Two-Sample KS Test using Proc NPAR1WAY procedure?

The data is like this: I have a list of customers. Each customer has reported income and modeled income in the database. I want to know how reported income distribution differs from modeled income distribution. Suppose variable names for cusotmer, reported income, and modeled income are ID, reported_icm, and modeled_icm. What the KS test codes would be like in SAS? Thanks.

Super User
Posts: 19,822

Re: How to Conduct a Two-Sample KS Test using Proc NPAR1WAY procedure?

Change your data structure to

ID Type Value

1 Reported 1234

1 Modeled 1234

Then use proc npar1way with TYPE as your class variable.

Ask a Question
Discussion stats
  • 1 reply
  • 168 views
  • 0 likes
  • 2 in conversation