Displaying 2 results from an estimated 2 matches for "p_sv".
Did you mean:
p_s
2006 Aug 07
1
mathematica -> r (gamma function + integration)
Dear R-list,
I try to transform a mathematica script to R.
#######relevant part of the Mathematica script
(* p_sv *)
dd = NN (DsD - DD^2);
lownum = NN (L-DD)^2;
upnum = NN (H-DD)^2;
low = lownum/(2s^2);
up = upnum/(2s^2);
psv = NIntegrate[1/(s^NN) Exp[-dd/(2s^2)]
(Gamma[1/2,0,up] + Gamma[1/2,0,low]),{s,sL,sH},
MinRecursion->3];
PSV = psv/Sqrt[2NN];
Print["------------- Results ---------------...
2006 Sep 01
1
integration problem with gamma function
...members,
I have a problem with translating a mathematica script into R. The whole
script is at the end of the email (with initial values for easy
reproduction) and can be pasted directly into R. The problematic part
(which is included below of course) is
<--- Original Mathematica --->
(* p_svbar *)
UiA = Ni (Dsi - 2Di A + A^2)/2;
UiiA = Nii (Dsii - 2Dii A + A^2)/2;
psvbar = NIntegrate[1/(UiA^(Ni/2)) 1/(UiiA^(Nii/2))
Gamma[Ni/2,UiA/(sH^2),UiA/(sL^2)]
Gamma[Nii/2,UiiA/(sH^2),UiiA/(sL^2)],{A,L,H},
MinRecursion->3];
PSVbar = psvbar/(4 Log[sH/sL]);
Print["p(s?v|D_1D_2I)...