Functions for detecting replicates and for calculating sample variance at specific design points
varPerReps(X, Y) estimateNugget(X, Y) anyReps(X)
the design matrix
a vector (or 1 column matrix) of observations
varPerReps returns a 1-column matrix where element i corresponds to the sample variance in observations corresponding to design point X[i]
varPerReps
estimateNugget returns a double calculated by taking the mean of the matrix returned by varPerReps
estimateNugget
anyReps returns TRUE if two or more rows of X are identical
anyReps
TRUE
X
https://github.com/gdancik/mlegp/
# NOT RUN { x = matrix(c(1,1,2,3,3)) # the design matrix y = matrix(c(5,6,7,0,10)) # output anyReps(x) varPerReps(x,y) estimateNugget(x,y) # }
Run the code above in your browser using DataLab