[英]JuliaCall & MixedModels Extract the Fixed-effects parameters into a R data frame
I am using JuliaCall R package to run GLMM with Julia on R following this tutorial: https://rpubs.com/dmbates/377897 我遵循此教程,使用JuliaCall R包在R上与Julia一起运行GLMM: https ://rpubs.com/dmbates/377897
I have successfully performed my model but I don't know how to store the 'Fixed-effects parameters' into an R data frame in order to work with it. 我已经成功执行了模型,但不知道如何将“固定效果参数”存储到R数据框中才能使用它。
Thanks in advance for your help. 在此先感谢您的帮助。
According to documentation of MixedModels
: http://dmbates.github.io/MixedModels.jl/stable/constructors.html#Fixed-effects-parameter-estimates-1 . 根据
MixedModels
文档: http : //dmbates.github.io/MixedModels.jl/stable/constructors.html#Fixed-effects-parameter-estimates-1 。 The fixed effect estimate can be extracted using Julia function fixef
, and the return value is not a DataFrame
but a vector in Julia, and JuliaCall
should be able to convert it to an R vector automatically. 可以使用Julia函数
fixef
提取固定效果估算值,并且返回值不是DataFrame
而是Julia中的向量,并且JuliaCall
应该能够将其自动转换为R向量。 So you can try things like: 因此,您可以尝试以下操作:
julia_eval("fixef(gm1)")
## if the result is stored in Julia as gm1, or julia_call("fixef", gm1)
## if the result is stored in R as gm1 julia_eval("fixef(gm1)")
##如果结果以gm1的形式存储在Julia中,或julia_call("fixef", gm1)
##如果结果以gm1的形式存储在R中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.