internal.functions: internal functions not intended for the user

internal.functionsR Documentation

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

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

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.

Author(s)

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

See Also

ic.test, orlm

Examples

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)

ic.infer documentation built on Oct. 5, 2023, 5:09 p.m.