nested_data function

Prepare a parameter-long data frame for statistical analysis