StatsBase.WeightVec as the type of a member of a composite type

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

StatsBase.WeightVec as the type of a member of a composite type

Douglas Bates
The GlmResp type in the GLM package has two members (wts and wrkwts) that represent weights.  If they are of the StatsBase.WeightVec type instead of just the V <: FPVector type some calculations can be expressed more naturally.  The WeightVec type is templated on eltype(V) and V whereas the GlmResp type only has V in the template.  Is there a way to get the equivalent of

  wts::StatsBase.WeightVec{eltype(V),V}

in the declaration of GlmResp?

--
You received this message because you are subscribed to the Google Groups "julia-stats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: StatsBase.WeightVec as the type of a member of a composite type

Andreas Noack
Are you asking if there is a function to extract the element from `Vector{T}` or are you asking if the `WeightVec` type can be extended to allow for two parameters?

On Thu, Feb 18, 2016 at 4:12 PM, Douglas Bates <[hidden email]> wrote:
The GlmResp type in the GLM package has two members (wts and wrkwts) that represent weights.  If they are of the StatsBase.WeightVec type instead of just the V <: FPVector type some calculations can be expressed more naturally.  The WeightVec type is templated on eltype(V) and V whereas the GlmResp type only has V in the template.  Is there a way to get the equivalent of

  wts::StatsBase.WeightVec{eltype(V),V}

in the declaration of GlmResp?

--
You received this message because you are subscribed to the Google Groups "julia-stats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "julia-stats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.