choice_prob
Compute the choice probability (CP), which is the ROC value between two response distributions associated with two alternative outcomes of a decision.For convenience, this analysis type also includes an option to compute a variable parameter that reflects a choice made on the basis of the responses within an nData file.
Output types
- choice_prob_print - print out the CP value, with an option to plot the two distributions of responses used in the ROC computation. Note, if the distribution of responses for Choice 1 has a larger mean than that for Choice 0, the CP will be > 0.5. If the parameter stat_file is set to a value other than "NULL", the CP value (followed by a carriage return) will be appended to the file name specified.
- write_ndata_append_choice - compute and insert a variable parameter into the nData file that signifies a choice. The computation involves comparing spike rates across two units (or poplations) in the input nData file. A new output nData file is written to outfile.
Parameters
- start - start of time window for response computation.
- period - duration of time window for response computation.
- choice_type - type of decision computation (chan_diff is default if not specified)
- chan_diff - compute the difference in response between the specified channels (see choice_add and choice_sub. below).
- prefix_diff - compute the difference in the sums of responses over all responses beginning with the specified prefixes (see choice_add and choice_sub below).
- choice_add - name (or prefix) for a channel (or group of channels) over which to sum activity to compute a decision variable from spiking responses. The decision variable will be 1 if the sum over these channels minus the sum over the choice_sub channels is greater than zero.
- choice_sub - name (or prefix) for a channel (or group of channels) over which to sum activity that will be subtracted from the decision variable (see choice_add).
- histogram_file - write histograms (xplot format) to this file to show the distributions of relevant values. For the choice_prob_print option, the distribution of response values (in raw spike count) for Choice 0 and Choice 1 are plotted. For the write_ndata_append_choice option, distributions are plotted for the decision variable and the additive and subtractive sums that were used to compute it (units are raw spike count, or difference thereof). Leave this parameter out to prevent such a file from being written.
- stat_file - This parameter specifies the name of a file to which statistics are appended. If the value "NULL" is used (or if this parameter is not specifed), then no statistics are appended. For the choice_prob_print output type, the CP value is appended to the file, followed by a carriage return.
- decision_param_name - this specifies the name of the variable parameter associated with the choice value. Values are 0 and 1 (to indicate two altenative choices, e.g., anti-preferred and preferred), and -1 indicates that there was no value decision.
Examples
Compute CP for a decision variable and print it to the standard outputCreate a decision variable on the basis of spike responses in the input nData file, and write an output nData file that includes this decision variable as a variable parameter.choice_prob all choice_prob_print chan unit0 start 0 # Start of time window to count spikes period 2000 # Duration of time period to count spikes decision_param_name choice # Name of the decision parameter histogram_file zz.hist.pl # Write xplot histograms to this file showing # the two response distributionsCreate a decision variable on the basis of the difference of two sums of respones in the input nData file, and write an output nData file that includes this decision variable as a variable parameter.choice_prob all write_ndata_append_choice chan unit0 start 0 # Start of time window to count spikes period 2000 # Duration of time period to count spikes # # To simulate a behavioral decision, we will compare the spike counts of # two single neurons # choice_add exs550 # Compute a metric by adding spike counts from this # channel (or population) choice_sub exs560 # Compute a metric by subtracting spike counts from # this channel (or population) decision_param_name choice # Use this name for decision parameter histogram_file zz.hist.pl # Write xplot histograms to this file to see # the distributions of the decision variableschoice_prob all write_ndata_append_choice chan ds_0_0 # Note, this is not used, but needs to specify a valid # channel in the file. (To be fixed in future.) start 0 # Start of time window to count spikes period 2000 # Duration of time period to count spikes # # To simulate a behavioral decision, we will compare spike counts across # two sets of responses, where each set includes all channels that have # names beginning with the specified strings, "choice_add" and "choice_sub". # choice_type prefix_diff # Interpret 'choice_add' and '..._sub' as prefixes choice_add ds_ # Compute a metric by adding spike counts from this # channel (or population) choice_sub dsopp_ # Compute a metric by subtracting spike counts from # this channel (or population) decision_param_name choice # Use this name for decision parameter