Armand1 / Evolution-Revolutions

This is a continuation of the Evolution and Ecology text mining project
1 stars 0 forks source link

Rstan Rho analysis #4

Open SamMckaylin opened 4 years ago

SamMckaylin commented 4 years ago

I haven't been able to get the Stan code to work yet. I've saved it as a .stan but it keeps outputting an error when I run it:

`Error in new_CppObject_xp(fields$.module, fields$.pointer, ...) : 
  Exception: variable does not exist; processing stage=data initialization; variable name=N; base type=int  (in 'model132a979839761_Rho' at line 3)`

I've spent the last hour trying to hash out a fix, I've tried feeding in my dataframe and tried specifying the variables in R and feeding them in but it doesn't seem to provide the variable to stan (based on the error). Do I need to specify the variables within the stan file or is there another fix? I haven't changed anything in the .stan file.

data{
### this is line 3  int N; // number of obs 
                              int K; // number of variables
                              matrix[N,K] X;
}
Armand1 commented 4 years ago

OK great --- I would not really be able to help you. My grip on STAN is thin.

SamMckaylin commented 4 years ago

It's begun outputting an alternative error now. I've looked around again now and there's not. much help anywhere. Do you have the contact of whoever wrote the STAN code so I can contact them and work out how to get it to work?

In the meantime I'll preemptively set up the code to difference all of the datasets.

SamMckaylin commented 4 years ago

With regards to the Rho analysis do you know which Rho value I should be using in my results? Revolutions in Ecology and Evolution.pdf

Please ignore all of the sigma values, they don't appear in the markdown except for when I knit it to html.