RE: [R] ks.test for conditional distribution Y|x

From: Wiener, Matthew <matthew_wiener_at_merck.com>
Date: Fri 08 Apr 2005 - 04:41:27 EST


Couldn't you do this by subtracting 0.5 + x from your y values and checking for normality with mean 0 and sd = 1 (using ks.test or another test of normality).

If you fail, you'll have to do additional work to find out whether pairs with some particular x value (or range of x values) is causing the problem, but I think this fits the question as stated.

Of course, if you have discrete x values, and enough data at each one, you could just run the check for each x.

Hope this helps,

Matt Wiener

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch
[mailto:r-help-bounces@stat.math.ethz.ch] On Behalf Of Vicky Landsman Sent: Thursday, April 07, 2005 3:16 PM
To: R-help list
Subject: [R] ks.test for conditional distribution Y|x

Dear experts,
Is it possible to use ks.test function to check the goodness of fit of the conditional distribution Y|X=x?
For example, I would like to check that my data (Y,X) come from Norm(0.5+x,1) using KS.
Thank you in advance,
Victoria Landsman.

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Fri Apr 08 04:47:00 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:04 EST