Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

INLA error #28

Closed
smeisler opened this issue Jul 20, 2022 · 5 comments
Closed

INLA error #28

smeisler opened this issue Jul 20, 2022 · 5 comments

Comments

@smeisler
Copy link
Contributor

Hi,

It appears that the there are symbols that are not being parsed correctly when doing the INLA implementation (EM=FALSE). This runs fine with EM.

SETTING UP DATA 
 .. reading in data for session 1
 .. reading in data for session 2
 MAKING DESIGN MATRICES 
 RUNNING MODELS 

 .. LEFT CORTEX ANALYSIS 
	 848 locations removed due to NA or NaN values in at least one scan.
.... prewhitening... done!

 .... estimating model with INLAError in str2lang(x) : <text>:1:13: unexpected symbol
1: y ~ -1 + f(0Back_Body_HRF
                ^
Calls: BayesGLM_cifti ... as.formula -> formula -> formula.character -> str2lang
Execution halted

Best,
Steven

@mandymejia
Copy link
Owner

mandymejia commented Jul 21, 2022 via email

@smeisler
Copy link
Contributor Author

Yes, no rush to fix this, thanks!

@danieladamspencer
Copy link
Collaborator

Hi all,

I'm back in the office and taking a look at this now. @smeisler , can you confirm that you are using the 2.0 branch of the package? It would also be helpful to have access to your data and the function call that you are using.

Thanks,
Dan

@danieladamspencer
Copy link
Collaborator

Hey @smeisler, I think I understand what happened here. Your variable name cannot be parsed by the str2lang function. As a quick example, I tried running:
str2lang("y ~ -1 + f(Back_Body_HRF)")
which worked fine. However, when I tried:
str2lang("y ~ -1 + f(0Back_Body_HRF)")
I got the same error you're exhibiting. Can you try renaming the elements in the onsets list that you input into the model and let me know if you see improvements? I think the main problem here is you are using a numeric followed by characters, which does not translate well when trying to parse a formula. Try something like "Zero_Back_Body_HRF" instead of "0Back_Body_HRF".

I hope this fixes it!
Dan

@smeisler
Copy link
Contributor Author

smeisler commented Aug 2, 2022

Ah that makes sense, thanks! I presume that will fix it, so I will close it here and reopen if the problem persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants