neural_input | R Documentation |
Converts event timing information into a neural input function representing the underlying neural activity before HRF convolution. This function is useful for:
neural_input(x, ...)
x |
A regressor object containing event timing information |
... |
Additional arguments passed to methods. Common arguments include:
|
Creating stimulus functions for fMRI analysis
Modeling sustained vs. transient neural activity
Generating inputs for HRF convolution
Visualizing the temporal structure of experimental designs
A list containing:
Numeric vector of time points
Numeric vector of input amplitudes at each time point
regressor
, evaluate.regressor
, HRF_SPMG1
# Create a regressor with multiple events
reg <- regressor(
onsets = c(10, 30, 50),
duration = c(2, 2, 2),
amplitude = c(1, 1.5, 0.8),
hrf = HRF_SPMG1
)
# Generate neural input function
input <- neural_input(reg, start = 0, end = 60, resolution = 0.5)
# Plot the neural input function
plot(input$time, input$neural_input, type = "l",
xlab = "Time (s)", ylab = "Neural Input",
main = "Neural Input Function")
# Create regressor with varying durations
reg_sustained <- regressor(
onsets = c(10, 30),
duration = c(5, 10), # sustained activity
amplitude = c(1, 1),
hrf = HRF_SPMG1
)
# Generate and compare neural inputs
input_sustained <- neural_input(
reg_sustained,
start = 0,
end = 60,
resolution = 0.5
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.