You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to add random effects to my Cox model formulation, and I have noticed that
cox1 = coxph(@formula(event ~ A + B + C + (1|D)), data)
produces the following error:
ERROR: MethodError: no method matching |(::Int64, ::String)
Closest candidates are:
|(::Any, ::Any, ::Any, ::Any...) at operators.jl:591
|(::T, ::T) where T<:Union{Int128, Int16, Int32, Int64, Int8, UInt128, UInt16, UInt32, UInt64, UInt8} at int.jl:365
|(::T, ::CEnum.Cenum{S}) where {T<:Integer, S<:Integer} at ~/.julia/packages/CEnum/Bqafi/src/operators.jl:13
but this syntax is allowed in @formula (i.e., the following works fine):
@formula(event ~ A + B + C + (1|D))
I assume mixed effects aren't supported in coxph?
For reference, random effects in survival analysis are often referred to as 'frailty terms' (in fact, I think in R they are added as frailty(D) as opposed to 1|D, but I'm not sure.
Is this something that is supported but I'm just doing it wrong?
The text was updated successfully, but these errors were encountered:
Hi @casasgomezuribarri, apologies for the delayed response. Mixed effects are not currently supported by this package though it's something I'd like to incorporate eventually.
I want to add random effects to my Cox model formulation, and I have noticed that
produces the following error:
but this syntax is allowed in
@formula
(i.e., the following works fine):I assume mixed effects aren't supported in
coxph
?For reference, random effects in survival analysis are often referred to as 'frailty terms' (in fact, I think in R they are added as
frailty(D)
as opposed to1|D
, but I'm not sure.Is this something that is supported but I'm just doing it wrong?
The text was updated successfully, but these errors were encountered: