Closed Jwetherington closed 3 years ago
Apologies as I posted the wrong error message. The error included:
SYNTAX ERROR, MESSAGE(S) FROM PARSER: Info: Comments beginning with # are deprecated. Please use // in place of # for line comments. No matches for:
PKModelTwoCpt(real[ ], real[ ], real[ ], real[ ], int[ ], int[ ], int[ ], int[ ], real[ ], real[ ], real[ ])
80: addl[start[j]:end[j]],
81: ss[start[j]:end[j]],
82: parms, F, tLag);
^
83:
Error in stanc(file = file, model_code = model_code, model_name = model_name, : failed to parse Stan model 'multiDoseME2PK1' due to the above error. Called from: stanc(file = file, model_code = model_code, model_name = model_name, verbose = verbose, obfuscate_model_name = obfuscate_model_name, allow_undefined = allow_undefined, isystem = isystem)
First we need make sure you're using the latest version and your macOS is setup correctly. Please download the repo by
git clone -b develop git@github.com:metrumresearchgroup/Torsten.git
and try to compile the 2-cpt model
cd Torsten/cmdstan/
make -j4 build
make ../example-models/pk2cpt/pk2cpt
If that works, you can later follow cmdstanr instruction(see also #27 ) to use R interface.
Entered in the terminal window in the HOME directory: git clone -b develop git@github.com:metrumresearchgroup/Torsten.git
The following message was generated:
Cloning into 'Torsten'... Warning: Permanently added the RSA host key for IP address '140.82.113.3' to the list of known hosts. git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Am I missing something?
Does https work?
git clone -b develop https://github.com/metrumresearchgroup/Torsten.git
If not, simply choos "download ZIP".
Successfully downloaded Torsten via https and compiled example-models/pk2cpt/pk2cpt. Then successfully installed CmdStanR using install.packages("cmdstanr", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
Using the R interface to compile the PMX function PKModelOneCpt(time, amt, rate, ii, evid, cmt, addl, ss, theta, F, tlag) generated the following error:
SYNTAX ERROR, MESSAGE(S) FROM PARSER: No matches for:
PKModelOneCpt(real[ ], real[ ], real[ ], real[ ], int[ ], int[ ], int[ ], int[ ], real[ ], real[ ], real[ ])
93: addl[start[j]:end[j]],
94: ss[start[j]:end[j]],
95: parms, F, tLag);
^
96:
Error in stanc(file = file, model_code = model_code, model_name = model_name, : failed to parse Stan model 'multiDosePK1Torsten' due to the above error. Called from: stanc(file = file, model_code = model_code, model_name = model_name, verbose = verbose, obfuscate_model_name = obfuscate_model_name, allow_undefined = allow_undefined, isystem = isystem)
Is the PKModelOneCpt function available through Torsten? I've not tried other functions. Thank you very much for your help.
As you can see the documentation and pk2cpt example there's been a change in signature. The functionality can be access through pmx_solve_twocpt
function.
I've attempted to run the 2-compartment PK model using the R interface to Torsten which has generated the following error message:
Compiling Stan program... \ Semantic error in '/var/folders/k_/t891xypn0vvd7x5lfdv6txmh0000gn/T/RtmpvhNll8/model-a7d43e46fd25.stan', line 87, column 26 to line 95, column 20:
A returning function was expected but an undeclared identifier 'PKModelOneCpt' was supplied.
make: *** [/var/folders/k_/t891xypn0vvd7x5lfdv6txmh0000gn/T/RtmpvhNll8/model-a7d43e46fd25.hpp] Error 1 Error: An error occured during compilation! See the message above for more information. Called from: self$compile(...)
I've had challenges installing the R interface to Torsten and, so far, I'm thinking I've not been successful. I would appreciate some guidance. Apologies for the open ended request, but I'm new to Torsten/Stan. Thanks in advance for your help in this matter.