peclayson / ERA_Toolbox

Matlab toolbox for obtaining dependability estimates for ERP measurements
6 stars 1 forks source link

Error when analyzing data #18

Closed aislinnsandre closed 6 years ago

aislinnsandre commented 6 years ago

Hello Dr. Clayson,

I am interested in conducting dependability estimates on my data. I have formatted my data correctly and have downloaded the most recent dependents you list in the user manual for the ERA toolbox (i.e., MatlabStan (v 2.15.1.0), CmdStan (v 2.17.0), and MatlabProcessManager (v 0.5.1). I am using MatLab R2017a with a Macbook Pro (macOS High Sierra V 10.13.4). After entering "era_start", I receive the following output:

era_start

Ensuring dependents are found in the Matlab path ERA Toolbox files found CmdStan, MatlabProcessManager, and MatlabStan files found CmdStan version is current MatlabProcessManager version is current Checking the installed version of MatlabStan is not currently supported

ERP Reliability Analysis Toolbox Version 0.4.8 You are running the most up-to-date version of the toolbox

Additionally, after selecting "Analyze", I get the following message/error:

Loading Data... This may take awhile depending on the amount of data...

Warning: Variable names were modified to make them valid MATLAB identifiers. The original names are saved in the VariableDescriptions property.

Preparing data for analysis...

Model is being run in cmdstan

This may take a while depending on the amount of data To use 'nansum', at least one of the following products must be both licensed and installed: Financial Toolbox Statistics and Machine Learning Toolbox

Error in StanFit/block (line 363) while nansum(self.loaded) ~= numel(self.loaded)

Error in era_computerel (line 376) fit.block();

Error in era_computerelwrap (line 168) REL = era_computerel('data',era_data.proc.data,...

Error in era_startproc>era_exec (line 1184) era_data = era_computerelwrap('era_prefs',era_prefs,'era_data',era_data);

Error while evaluating DestroyedObject Callback.

output-3.csv: Informational Message: The current Metropolis proposal is about to be rejected because of the following issue: output-3.csv: Exception: normal_lpdf: Scale parameter is 0, but must be > 0! (in '/Users/Aislinn/Desktop/Temp_StanFiles/cmdstan19-Jul-2018.stan' at line 19) output-3.csv: If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine, output-3.csv: but if this warning occurs often then your model may be either severely ill-conditioned or misspecified. output-3.csv: Informational Message: The current Metropolis proposal is about to be rejected because of the following issue: output-3.csv: Exception: normal_lpdf: Scale parameter is 0, but must be > 0! (in '/Users/Aislinn/Desktop/Temp_StanFiles/cmdstan19-Jul-2018.stan' at line 19) output-3.csv: If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine, output-3.csv: but if this warning occurs often then your model may be either severely ill-conditioned or misspecified. Warning: Error occurred while executing the listener callback for event exit defined for class processState: Undefined function 'nansum' for input arguments of type 'double'.

Error in StanFit/process_exit_success (line 272) if nansum(self.loaded) == numel(self.loaded)

Error in StanFit/process_exit (line 165) self.process_exit_success(src);

Error in StanFit>@(src,evnt)process_exit(self,src,evnt)

Error in processState/set.exitValue (line 30) notify(self,'exit');

Error in processManager.pollTimerStop (line 504) pollData.state.exitValue = exitValue;

Error in timer/timercb (line 30) feval(val{1}, obj, eventStruct, val{2:end});

Error in timercb (line 13) timercb(t, varargin{2:end});

In processState/set.exitValue (line 30) In processManager.pollTimerStop (line 504) In timer/timercb (line 30) In timercb (line 13) Warning: Error occurred while executing the listener callback for event exit defined for class processState: Undefined function 'nansum' for input arguments of type 'double'.

Error in StanFit/process_exit_success (line 272) if nansum(self.loaded) == numel(self.loaded)

Error in StanFit/process_exit (line 165) self.process_exit_success(src);

Error in StanFit>@(src,evnt)process_exit(self,src,evnt)

Error in processState/set.exitValue (line 30) notify(self,'exit');

Error in processManager.pollTimerStop (line 504) pollData.state.exitValue = exitValue;

Error in timer/timercb (line 30) feval(val{1}, obj, eventStruct, val{2:end});

Error in timercb (line 13) timercb(t, varargin{2:end});

In processState/set.exitValue (line 30) In processManager.pollTimerStop (line 504) In timer/timercb (line 30) In timercb (line 13) Warning: Error occurred while executing the listener callback for event exit defined for class processState: Undefined function 'nansum' for input arguments of type 'double'.

Error in StanFit/process_exit_success (line 272) if nansum(self.loaded) == numel(self.loaded)

Error in StanFit/process_exit (line 165) self.process_exit_success(src);

Error in StanFit>@(src,evnt)process_exit(self,src,evnt)

Error in processState/set.exitValue (line 30) notify(self,'exit');

Error in processManager.pollTimerStop (line 504) pollData.state.exitValue = exitValue;

Error in timer/timercb (line 30) feval(val{1}, obj, eventStruct, val{2:end});

Error in timercb (line 13) timercb(t, varargin{2:end});

In processState/set.exitValue (line 30) In processManager.pollTimerStop (line 504) In timer/timercb (line 30) In timercb (line 13)

I have included a snapshot of my data, so you can see.

dataset_screenshot

Also, I am wondering whether it is possible to recreate the dependability graph that is computed after analyzing the data. In order to do this, I would need the dependability estimates when when one, two, three ... twenty trials are included. Is there a quick way to obtain these data or would I need to analyze my data one trial at a time and get the estimate (i.e., analyze all participants with one trial and get the estimate and then analyze all participants with two trials and get the estimate, and so on)?

Please let me know what you think and how I can resolve this issue -- I appreciate the help.

Hope to hear from you soon,

Aislinn Sandre

peclayson commented 6 years ago

Hi,

I'm sorry to hear you ran into an error. Thank you for posting the output from the command window. That's very helpful 👍

It looks like MatlabStan requires the Statistics and Machine Learning Toolbox or the Financial Toolbox. I've re-written some code in the StanFit.m file so that it doesn't require either toolbox. Could you replace your StanFit.m file int he MatlabStan folder with this file and try to run the toolbox again? I'll post about it on the MatlabStan page to suggest removing those dependencies.

Also, the toolbox will compute the dependability graph for you, once you have analyzed the. It will be an option to plot in the View menu of era_start.

Good luck! Let me know how this plays out. -Peter

StanFit.zip

peclayson commented 6 years ago

Actually, can you also tell me when you downloaded MatlabStan? That file might not run depending on when you downloaded it... You can give it a shot anyway if you'd like.

-Peter

aislinnsandre commented 6 years ago

Hi Peter,

Thank you for your quick response -- I appreciate the help!

I downloaded MatlabStan about two weeks ago.

I ran the ERA toolbox with the StanFit.m file you sent and received a message to download the Statistics and Machine Learning Toolbox. After downloading this, the ERA toolbox worked perfectly -- no errors!

Thanks again for the help.

Best,

Aislinn

peclayson commented 6 years ago

Great! That was an easy fix. I'm glad it worked out. Let me know if you need anything else!

Good luck, Peter