X = sm.add_constant(np.column_stack((ele, X))) #resulting columns in the following order: reciprocal_num_sp, spike_length, std_error of spike cut length, ones the_fit = sm.OLS(y, X).fit() print 'pvalues of multilinear regression:' print '\treciprocal_num_sp, spike_length, std_error of spike cut length, ones' print '\t', the_fit.pvalues # Can print summary out put by #print the_fit.summary() # Perform multiple linear regression on the variable in question multiple_regression(ev_LIFASC_list, matrix) #--- calculate statistics of individual variables---- cre_dict = check_and_organize_data(all_neurons) # create dataframes for easy median calculations inhibit_df = pd.DataFrame(cre_dict['inhibitory'], columns=[ 'specimen_id', 'cre', 'std_err', 'length', 'n', '1/n', 'ev_LIFASC' ]) excite_df = pd.DataFrame(cre_dict['excitatory'], columns=[ 'specimen_id', 'cre', 'std_err', 'length', 'n', '1/n', 'ev_LIFASC' ]) inhibit = {} excite = {}
LIF_dict['th_NOT_opt']['from_zero'] * 1e3, #4 LIF_dict['th_opt']['absolute'] * 1e3, #5 LIF_dict['th_opt']['from_zero'] * 1e3, #6 LIFR_dict['th_opt']['absolute'] * 1e3, #7 LIFR_dict['th_opt']['from_zero'] * 1e3, #8 LIFASC_dict['th_opt']['absolute'] * 1e3, #9 LIFASC_dict['th_opt']['from_zero'] * 1e3, #10 LIFRASC_dict['th_opt']['absolute'] * 1e3, #11 LIFRASC_dict['th_opt']['from_zero'] * 1e3, #12 LIFRASCAT_dict['th_opt']['absolute'] * 1e3, #13 LIFRASCAT_dict['th_opt']['from_zero'] * 1e3 ]) #14 (cre_dict) = check_and_organize_data( all_neurons) #organizes data into format used for distribution plotting percentile_dict = distribution_plot(cre_dict, 3, 2, xlabel='Resting potential (mV)', ylabel=r'Measured $\theta_{\infty}$ (mV)') percentile_dict = distribution_plot( cre_dict, 3, 4, xlabel='Resting potential (mV)', ylabel=r'Measured $\Delta V$ $\theta_{\infty}$ (mV)') plt.figure() for cre in cre_dict: for neuron in cre_dict[cre]: