brMask {blindreview}R Documentation

Blind Review of Database Using Forward Search Procedures

Description

Assigns identification randomly to one of the variables of the dataset as chosen by the user, say Treatment, and assigns random number to the observations of the dataset. Then runs the appropriate forward search function on the blinded dataset. A file is created so that the user can identify any outliers identified by the forward search procedure in terms of their original, unchanged values. Output is primarily for plotting by the plotdiag.blind.all function.

Usage

brMask(data, blinded, analysis, 
     initial.sample=1000, n.obs.per.level=1, skip.step1=NULL, fixed=NULL,
     lme.random=NULL, lme.formula=NULL,
     glm.estimate.phi=TRUE, glm.cobs=1, glm.response.cols=NULL, 
     glm.indep.cols=NULL, glm.formula=NULL, glm.binomialrhs=NULL, 
     glm.family=NULL, cph.formula.elements=NULL, cph.event.time=NULL, 
     cph.status=NULL, cph.x=NULL, cph.ties=NULL, cph.redunCorr=0.9,
     arguments=FALSE, verbose=TRUE) 

Arguments

data

Dataset to be evaluated

blinded

Character, name of variable to be blinded

analysis

Character, one of "lme", "lm", "glm", or "cph"

initial.sample

Number of observations in Step 1 of forward search

n.obs.per.level

Number of observations per level of (possibly crossed) factor levels

skip.step1

NULL or a vector of integers for observations to be included in Step 1

fixed

Fixed effects formula as described in stats::lm

lme.random

Random effects formula as described in nlme::lme

lme.formula

a simplified formula of the form resp ~ cov | group where resp is the response, cov is the primary covariate, and group is the grouping factor, as in nlme::groupedData

glm.estimate.phi

TRUE causes phi to be estimated; FALSE causes phi to be set = 1

glm.cobs

Number of observations to include in each inner subgroup of Step 1

glm.response.cols

Vector of column numbers (2) of responses and nonresponses

glm.indep.cols

Column number(s) of independent variables

glm.formula

Formula relating response to independent variables. Required except for family=binomial

glm.binomialrhs

Right-hand side of formula, as text object. Required for family=binomial

glm.family

Error distribution and link

cph.formula.elements

Vector of names of independent variables to appear in a formula object

cph.event.time

Vector of event times, censored or not

cph.status

Vector indicator of event or censoring: 1 = event, 0 = censored, same length as event.time

cph.x

Data frame of independent variables, with number of rows = length of event.time, First column is Observation. Factor variables must be defined in advance. Does not include event time or status.

cph.ties

Character string specifying the method of handling ties in event time, "efron", "breslow" or "exact", . See survival::coxph for definitions. Default is "efron" if specified =NULL

cph.redunCorr

Level of correlation required before declare variables are redundant

arguments

Logical. TRUE causes display of arguments of forsearch_xxx function

verbose

TRUE causes function identifier to display before and after run

Value

LIST, unnecessary elements for current analysis are NULL

Analysis

"lme", "lm", "glm", or "cph"

Unmask

Data frame of original and masked values

Rows in stage

List of (masked) observation numbers in each stage

Standardized residuals

Matrix of errors at each stage

Number of model parameters

Rank of model

Sigma

Estimate of random error at final stage; used to standardize all residuals

Fixed parameter estimates

Matrix of parameter estimates at each stage

s^2

Estimate of random error at each stage

Leverage

Matrix of leverage of each observation at each stage

Modified Cook distance

Estimate of sum of squared changes in parameter estimates at each stage

t statistics

t statistics for each fixed parameter

Family

Family and link

Residual deviance

Vector of deviances

Null deviance

Vector of null deviances

PhiHat

Vector of values of phi parameter

Deviance residuals and augments

Deviance residuals with indication of whether each is included in fit

AIC

Vector of AIC values

Number of rows included in Step 1

Number of observations included in Step 1

Rows by subgroup

List of row numbers, by subgroup

Random parameter estimates

Matrix of parameter estimates at each stage

Dims

Dims from fit of lme function

Fit statistics

AIC, BIC, and log likelihood

Wald Test

Wald test from fit of coxph function

LogLikelihood

Log likelihood from fit of coxph function

Likelihood ratio test

Likelihood ratio test from fit of coxph function

forsearch Call

Call to forsearch function

Call

Call to this function

Author(s)

William R. Fairweather

References

Atkinson, A and M Riani. Robust Diagnostic Regression Analysis, Springer, New York, 2000. Pinheiro, JC and DM Bates. Mixed-Effects Models in S and S-Plus, Springer, New York, 2000. https://CRAN.R-project.org/package=forsearch


[Package blindreview version 1.3.0 Index]