简体   繁体   English

JuliaCall和MixedModels将固定效果参数提取到R数据框中

[英]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.

相关问题 R 中 function 的时间固定效应 - Time fixed-effects with felm function in R 如何从 lmerMod object 中提取原始公式(固定效应和随机效应)? - How to extract the original formula (fixed-effects and random-effects) from an lmerMod object? 不同版本的R,lme4和OS X在glmer中给出不同的固定效应显着性结果 - Different versions of R, lme4 and OS X give different fixed-effects significance results in glmer 如何在R中运行带有聚类标准误差和测量权重的固定效应logit模型? - How to run fixed-effects logit model with clustered standard errors and survey weights in R? 如何使用 plm() 将年份固定效应转化为十年固定效应? - How to turn year fixed-effects into decade fixed-effects with plm()? 如何计算纵向/面板数据的非线性(二进制)固定效应 Logit? - How to calculate nonlinear (binary) Fixed-Effects Logit for Longitudinal/Panel Data? plot 如何与个体水平变量和个体固定效应交互作用? - How to plot interaction effects with individual-level variable and individual fixed-effects? 从R中的数据帧中提取 - extract from a data frame in R R 中的固定效果回归 - Fixed effects regression in R R:PLM-年固定收益-年和季度数据 - R: plm — year fixed effects — year and quarter data
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM