Various helper functions.
replicMeans(nrep,toReplic,timing=FALSE)
stdErrPred(regObj,xnew)
pythonBlankSplit(s)
stopBrowser(msg = stop("msg not supplied"))
doPCA(x,pcaProp)
PCAwithFactors(x, nComps = ncol(x))
ulist(lst)
prToFile(filename)
partTrnTst(fullData,nTest=min(1000,round(0.2*nrow(fullData))))
findOverallLoss(regests,y,lossFtn = MAPE)
getNamedArgs(argVec)
multCols(x,cols,vals)
probIncorrectClass(yhat, y, startAt1 = TRUE)
propMisclass(y,yhat)
Fitted regression estimates, training set.
Y values, training set.
Predicted Y values
TRUE if indexing starts at 1, FALSE if starting at 0.
Loss functin.
A data frame or matrix.
Number of rows for the test set.
Name of output file.
An R list.
Matrix or data frame.
Fraction in [0,1], specifying number of PCA components to compute, in terms of fraction of total variance.
Number of PCA components.
An object of class 'lm'
or similar, for which
there is a vcov
generic function.
New X value to be predicted.
Number of replications.
A character string.
Function call(s), as a quoted string, separated by semicolons if more than one call.
If TRUE, find average elapsed time over the replicates.
Character string, error message for existing debug browser.
R list or vector with named elements.
A set of column numbers.
A set of positive expansion numbers.
The function PCAwithFactors
returns an object of class
'PCAwithFactors'. with components pcout
, the object returned by
the wrapped call to prcomp
; factorsInfo
, factor conversion
information to be used with predict
; and preds
, the PCA
version of x
.
The function getNamedArgs
will assign in the caller's space
variables with the names and values in argVec
.
The function PCAwithFactors
is a wrapper for
stats::prcomp
, to be used on data frames that contain at least on
R factor.
# NOT RUN {
w <- list(a=3,b=8)
getNamedArgs(w)
a
b
u <- c(5,12,13)
names(u) <- c('x','y','z')
getNamedArgs(u)
x
y
z
# }
Run the code above in your browser using DataLab