> n = 850
> R2 = 0.9338147
> p = 2
> linearReg.R2stat(N = n, p = p, R2 = R2, rscale = sqrt(2)/4)
Error in integrate(integrand.regression, lower = 0, upper = Inf, N = N, :
non-finite function value
This is due to the integral value being so large. This can probably be fixed by evaluating the log of the integrand at the mode (see Liang et al appendix) and subtracting this from the integrand before exponentiating then adding the value back to the log of the result.
The following code returns an error:
This is due to the integral value being so large. This can probably be fixed by evaluating the log of the integrand at the mode (see Liang et al appendix) and subtracting this from the integrand before exponentiating then adding the value back to the log of the result.