vfaggregate {visualFields}R Documentation

Statistical analyses for visual fields data

Description

Usage

vfaggregate(vf, by = "date", fun = mean, ...)

vfmean(vf, by = "date", ...)

vfretestdist(vf, nbase = 1, nfollow = 1, alpha = 0.1, ...)

Arguments

vf

a table with visual fields data. Data is rounded, which leaves sensitivity data unchanged, but it is necessary for the nature of the algorithm if the data passed are TD or PD values or summary stats such as averages. Beware of the locations in the blind spot, which very likely need to be removed

by

aggregate by date, that is by id, eye, and date (default) or by eye, that is by id and eye

fun

a function to compute the summary statistics which can be applied to all data subsets. The default is 'mean'

...

arguments to be passed to or from methods. A useful one to try is type of quantile calculation 'type' use in quantile

nbase

number of visual fields to be used as baseline

nfollow

number of visual fields to be used as follow up

alpha

significance level to derive the conditional retest intervals. Default value is 0.1

Details

Value

vfaggregate and vfmean return a vf data frame with aggregate values

vfretestdist returns a list with the following elements:

Together ylow and yup represent the lower and upper limit of the (1 - alpha)% confidence intervals at each value x.

Examples

# aggregate by date
vfaggregate(vfpwgRetest24d2, by = "date")           # compute the mean
vfaggregate(vfpwgRetest24d2, by = "date", fun = sd) # compute standard deviation
# aggregate by eye
vfaggregate(vfpwgRetest24d2, by = "eye")           # compute the mean
vfaggregate(vfpwgRetest24d2, by = "eye", fun = sd) # compute standard deviation
# mean by date
vfmean(vfpwgRetest24d2, by = "date")
# mean by eye
vfmean(vfpwgRetest24d2, by = "eye")
# get the retest sensitivity data after removing the blind spot
retest <- vfretestdist(vfpwgRetest24d2, nbase = 1, nfollow = 1)

plot(0, 0, typ = "n", xlim = c(0, 40), ylim = c(0,40),
     xlab = "test in dB", ylab = "retest in dB", asp = 1)
for(i in 1:length(retest$x)) {
  points(rep(retest$x[i], length(retest$y[[i]])), retest$y[[i]],
         pch = 20, col = "lightgray", cex = 0.75)
}
lines(c(0,40), c(0,40), col = "black")
lines(retest$x, retest$ymed, col = "red")
lines(retest$x, retest$ylow, col = "red", lty = 2)
lines(retest$x, retest$yup, col = "red", lty = 2)

[Package visualFields version 1.0.1 Index]