Learn R Programming

ic.infer (version 1.1-7)

internal.functions: internal functions not intended for the user

Description

nchoosek is originally taken from package vsn by Wolfgang Huber, GaussianElimination and RREF have been provided by John Fox in R-help and have been modified by the author to provide more output

Usage

nchoosek(n, k)    ## not exported, calculates all combinations
GaussianElimination(A, B, tol=sqrt(.Machine$double.eps),
    verbose=FALSE)   ## not exported
RREF(X, ...)    ## not exported, calculates reduced Echelon form

Value

nchoosek returns all subsets of size k, for GaussianElimination and RREF cf. comments in code. The latter are used for reducing a matrix with less than full row rank to a set of linearly independent rows.

Arguments

n

number of elements to choose from

k

number of elements to choose

A

argument to GaussianElimination

B

argument to GaussianElimination

tol

argument to GaussianElimination

verbose

argument to GaussianElimination

X

matrix to be reduced to reduced Echelon form

...

further arguments to GaussianElimination

Author

Ulrike Groemping, BHT Berlin, based on code by John Fox and Wolfgang Huber

See Also

ic.test, orlm

Examples

Run this code
z <- 0.5
corr <- matrix(c(1,0.9,0.9,1),2,2)
print(wt.plus <- ic.weights(corr))
T <- c(z,z)%*%solve(corr,c(z,z))
1-pchibar(T,2:0,wt.plus)
1-pbetabar(T/(T+10),2:0,10,wt.plus)
corr <- matrix(c(1,0,0,1),2,2)
print(wt.0 <- ic.weights(corr))
T <- c(z,z)%*%solve(corr,c(z,z))
1-pchibar(T,2:0,wt.0)
1-pbetabar(T/(T+10),2:0,10,wt.0)
corr <- matrix(c(1,-0.9,-0.9,1),2,2)
print(wt.minus <- ic.weights(corr))
T <- c(z,z)%*%solve(corr,c(z,z))
1-pchibar(T,2:0,wt.minus)
1-pbetabar(T/(T+10),2:0,10,wt.minus)

Run the code above in your browser using DataLab