unfoldtoolbox / UnfoldSim.jl

Simulate EEG / ERP data with overlap, non-linear effects, multiple regression
MIT License
7 stars 4 forks source link

Improve UnfoldSim Docstrings #108

Open jschepers opened 1 month ago

jschepers commented 1 month ago

Here we can list Doc strings that need to be revised either because they are unclear or incomplete or because their formatting is not correct or inconsistent. Afterwards, we can also have a look at the code to see whether any doc strings are missing for exported functions.

jschepers commented 2 weeks ago

@behinger Could you please add the missing information for the following docstrings

bases.jl

jschepers commented 1 day ago

@behinger Could you please have a look at/adapt the following docstrings:

component.jl

behinger commented 1 day ago

Please double-check whether the left-hand side of the formula is ignored for the MixedModelComponent but must be zero for the LinearModelComponent

We could change this and replace the lhs also with :df_tmp like in MixedModelsComponent then it would be consistentI don't see the downside, except :df_tmp being not useable as a column in events

behinger commented 1 day ago

simulatecomponent(rng, c::LinearModelComponent, design::AbstractDesign) Is it appropriate to say that the return type is Matrix? Is it always Matrix{Float64} or could it also be another type? Is the description of the output dimensions correct?

This was actually surprisingly hard to find out. Turns out we use a ModelFrame in the background. It is theoretically possible by reimplementing a bit to return also other types, but Matrix{Float64} is the default as returned from StatsModels

behinger commented 1 day ago

weight_sigmas - Here it is difficult to provide an example, I think this is such a implementation specific internal function, that we don't need it.

I think in general only the outward facing functions need proper docstrings, for the others it is a nice to have