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

Wiener, Matthew matthew_wiener at merck.com
Thu Apr 7 20:41:27 CEST 2005


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 at stat.math.ethz.ch
[mailto:r-help-bounces at 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 at 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




More information about the R-help mailing list