Description Usage Arguments Details Value Author(s) References Examples
View source: R/characterize_gaussian_fits.R
The orientation and partial correlations of Gaussian data are analyzed according to Levitt et al. 1994 and Priebe et al. 2003. Features include computation of partial correlations between response variables and independent and diagonallytuned predictions, along with Zdifference scoring.
1 2 3 4 5 6 
fit_objects_list 
A list of outputs from 
data 
A data.frame that contains the raw data (generally rectilinearly
gridded data, but this is not a strict requirement). Columns must be named

constrain_amplitude 
Default FALSE; should the amplitude of the
Gaussian be set to the maximum value of the 
... 
Additional arguments that can be passed to

This function accepts either a list of objects output from
fit_gaussian_2D()
(preferred) or a data.frame that contains the raw
data.
The supplied fit_objects_list must be a list that contains objects returned
by fit_gaussian_2D()
. This list must contain exactly three models. All
three models must have been run using method = "elliptical_log"
. The
models must be: 1) one in which orientation is unconstrained, 2) one in which
orientation is constrained to Q = 0 (i.e. a diagonallyoriented Gaussian),
and 3) one in which orientation is constrained to Q = 1 (i.e. a
horizontallyoriented Gaussian). See this function's Examples for guidance.
Should raw data be provided instead of the fit_objects_list, the
characterize_gaussian_fits()
runs fit_gaussian_2D()
internally.
This is generally not recommended, as difficulties in fitting models via
stats::nls()
are more easily troubleshot by the optional arguments in
fit_gaussian_2D()
. Nevertheless, supplying raw data instead of a list
of fitted models is feasible, though your mileage may vary.
A list with the following:
"model_comparison" A model comparison output (i.e. what is produced
by compare_gaussian_fits()
), which indicates the relative preference
of each of the three models.
"Q_table" A data.frame that provides information on the value of Q from the bestfitting model, along with the 595% confidence intervals of this estimate.
"r_i" A numeric, the correlation of the data with the independent (Q = 1) prediction.
"r_s" A numeric, the correlation of the data with the diagonally oriented (Q = 0) prediction.
"r_is" A numeric, the correlation between the independent (Q = 1) prediction and the the diagonallyoriented (Q = 0) prediction.
"R_indp" A numeric, partial correlation of the response variable with the independent (Q = 1) prediction.
"R_diag" A numeric, partial correlation of the response variable with the diagonallyoriented (Q = 0) prediction.
"ZF_indp" A numeric, the Fisher Ztransform of the R_indp coefficient. See Winship et al. 2006 for details.
"ZF_diag" A numeric, the Fisher Ztransform of the R_diag coefficient. See Winship et al. 2006 for details.
"Z_diff" A numeric, the Zdifference between ZF_indp and ZF_diag. See Winship et al. 2006 for details.
Vikram B. Baliga
Levitt JB, Kiper DC, Movshon JA. Receptive fields and functional architecture of macaque V2. J Neurophysiol. 1994 71:2517–2542.
Priebe NJ, Cassanello CR, Lisberger SG. The neural representation of speed in macaque area MT/V5. J Neurosci. 2003 Jul 2;23(13):565061. doi: 10.1523/JNEUROSCI.231305650.2003.
Winship IR, Crowder N, Wylie DRW. Quantitative reassessment of speed tuning in the accessory optic system and pretectum of pigeons. J Neurophysiol. 2006 95(1):546551. doi: 10.1152/jn.00921.2005
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57  if (interactive()) {
library(gaussplotR)
## Load the sample data set
data(gaussplot_sample_data)
## The raw data we'd like to use are in columns 1:3
samp_dat <
gaussplot_sample_data[,1:3]
## Fit the three required models
gauss_fit_uncn <
fit_gaussian_2D(
samp_dat,
method = "elliptical_log",
constrain_amplitude = FALSE,
constrain_orientation = "unconstrained"
)
gauss_fit_diag <
fit_gaussian_2D(
samp_dat,
method = "elliptical_log",
constrain_amplitude = FALSE,
constrain_orientation = 0
)
gauss_fit_indp <
fit_gaussian_2D(
samp_dat,
method = "elliptical_log",
constrain_amplitude = FALSE,
constrain_orientation = 1
)
## Combine the outputs into a list
models_list <
list(
gauss_fit_uncn,
gauss_fit_diag,
gauss_fit_indp
)
## Now characterize
out <
characterize_gaussian_fits(models_list)
out
## Alternatively, the raw data itself can be supplied.
## This is less preferred, as fitting of models may fail
## internally.
out2 <
characterize_gaussian_fits(data = samp_dat)
## This produces the same output, assuming models are fit without error
identical(out, out2)
}

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.