Learn R Programming

FDboost (version 1.1-2)

emotion: EEG and EMG recordings in a computerised gambling study

Description

To analyse the functional relationship between electroencephalography (EEG) and facial electromyography (EMG), Gentsch et al. (2014) simultaneously recorded EEG and EMG signals from 24 participants while they were playing a computerised gambling task. The given subset contains aggregated observations of 23 participants. Curves were averaged over each subject and each of the 8 study settings, resulting in 23 times 8 curves.

Usage

data("emotion")

Arguments

Format

A list with the following 10 variables.

power

factor variable with levels high and low

game_outcome

factor variable with levels gain and loss

control

factor variable with levels high and low

subject

factor variable with 23 levels

EEG

matrix; EEG signal in wide format

EMG

matrix; EMG signal in wide format

s

time points for the functional covariate

t

time points for the functional response

Details

The aim is to explain potentials in the EMG signal by study settings as well as the EEG signal (see Ruegamer et al., 2018).

Examples

Run this code
data("emotion", package = "FDboost")

# fit function-on-scalar model with random effect and power effect
fos_random_power <- FDboost(EMG ~ 1 + brandomc(subject, df = 2)
                            + bolsc(power, df = 2),
                            timeformula = ~ bbs(t, df = 3),
                            data = emotion)
if (FALSE) {                            
# fit function-on-function model with intercept and historical EEG effect
# where limits specifies the used lag between EMG and EEG signal
fof_historical <- FDboost(EMG ~ 1 + bhist(EEG, s = s, time = t,
                          limits = function(s,t) s < t - 3),
                          timeformula = ~ bbs(t, df = 3), data = emotion,
                          control = boost_control(mstop = 200))                            
}

Run the code above in your browser using DataLab