[R] Normal cdf modified function

2009-02-17 Thread Fernando Saldanha
I wonder if an R package would have a function that calculates the following.

Let Y be a normal multivariate function. For example, let Y have 4
dimensions. I want to calculate

P(Y1 < Z1, Y2 < Z2, Y3 > Z3, Y4 > Z4).

There are R functions to do the calculation if all the inequalities
are of the type "<" (the cdf). But is there an R function where the
two types of inequalities ("<" and ">") can be mixed? (The user would
have to specify the set of indexes with inequalities of the type ">")

Thanks for any suggestions.

FS

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Normal cdf modified function

2009-02-18 Thread dwinsemius
I would think this could be approached by segmenting the  probability "volume" 
using identities such as these:

P(Y1 < Z1, Y2 < Z2, Y3 > Z3, Y4 > Z4) + P(Y1 < Z1, Y2 < Z2, Y3 > Z3, Y4 < Z4) =
  P(Y1 < Z1, Y2 < Z2, Y3 > Z3, Y4 < Inf)

and 

P(Y1 < Z1, Y2 < Z2, Y3 < Z3, Y4  Z3, Y4 < Inf) =
  P(Y1 < Z1, Y2 < Z2, Y3 
> I wonder if an R package would have a function that calculates the following.
> 
> Let Y be a normal multivariate function. For example, let Y have 4
> dimensions. I want to calculate
> 
> P(Y1 < Z1, Y2 < Z2, Y3 > Z3, Y4 > Z4).
> 
> There are R functions to do the calculation if all the inequalities
> are of the type "<" (the cdf). But is there an R function where the
> two types of inequalities ("<" and ">") can be mixed? (The user would
> have to specify the set of indexes with inequalities of the type ">")
> 
> Thanks for any suggestions.
> 
> FS
> 
> __
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Normal cdf modified function

2009-02-18 Thread Giovanni Petris

> Let Y be a normal multivariate function. For example, let Y have 4
> dimensions. I want to calculate
> 
> P(Y1 < Z1, Y2 < Z2, Y3 > Z3, Y4 > Z4).
> 
> There are R functions to do the calculation if all the inequalities
> are of the type "<" (the cdf). But is there an R function where the

The cdf, and some elementary algebra, is enough to compute the
probability you are interested in.

> two types of inequalities ("<" and ">") can be mixed? (The user would
> have to specify the set of indexes with inequalities of the type ">")

Giovanni

-- 

Giovanni Petris  
Associate Professor
Department of Mathematical Sciences
University of Arkansas - Fayetteville, AR 72701
Ph: (479) 575-6324, 575-8630 (fax)
http://definetti.uark.edu/~gpetris/

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.