phillips.getpmat: utility functions for reading output from Phillips' CPC...

Description Usage Arguments Details Value Author(s) See Also

Description

Read various forms of input from the non-machine-friendly output format of Phillips' code for calculating common principal components

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
phillips.getvec(con, n=3, hdrlines = 1)
phillips.getmat(con, n=3, hdrlines = 1)
phillips.getsubmat(con, n=3)
phillips.getpmat(con, n, hdrlines = 1)
phillips.getcolonval(con)
phillips.getsection(con,hdrlines,ntests,
                                 nvar,
                                 ngrp,
                                 matvals=FALSE,
                                 grpevals=FALSE,
                                 grps=TRUE,
                                 nevecs=1,
verbose=FALSE)

Arguments

con

a connection that is open for reading

n

(numeric) number of elements in vector or dimension of square matrix to read from file

hdrlines

(numeric) number of header lines to skip

nvar

number of variables

ngrp

number of groups

ntests

number of nested hypothesis tests in a section

matvals

does each matrix also have an associated scalar value (e.g. proportionality constants)?

grpevals

are there separate eigenvalues for each group?

grps

are there matrices for each group?

nevecs

how many eigenvectors are there to read?

verbose

print debugging information?

Details

getvec() reads an n-element vector; getmat() reads an n-by-n matrix, with helper file getsubmat(); getpmat() reads a table representing a series of chi-square tests of hypotheses; getconline() reads a single parameter at the end of a line of text, delimited by a colon. getsection() gets a whole section.

Value

A numeric vector or matrix or a matrix of chi-square, degrees of freedom, and p-values, as appropriate. getsection a list containing a criterion for equivalence (crit); number of parameters (par); a matrix of hypothesis tests (testmat); a set of eigenvalues evals; a set of eigenvector matrices (evecs); and a set of variance-covariance matrices (cov).

Author(s)

Ben Bolker

See Also

read.cpc


bbolker/cpcbp documentation built on May 11, 2019, 9:28 p.m.