diff --git a/src/schema.jl b/src/schema.jl index 7245793a..2f352e8f 100644 --- a/src/schema.jl +++ b/src/schema.jl @@ -184,9 +184,7 @@ concrete_term(t, d, hint) = t concrete_term(t::Term, xs::AbstractVector{<:Number}, ::Nothing) = concrete_term(t, xs, ContinuousTerm) function concrete_term(t::Term, xs::AbstractVector, ::Type{ContinuousTerm}) - μ, σ2 = StatsBase.mean_and_var(xs) - min, max = extrema(xs) - ContinuousTerm(t.sym, promote(μ, σ2, min, max)...) + ContinuousTerm(t.sym) end # default contrasts: dummy coding concrete_term(t::Term, xs::AbstractVector, ::Nothing) = concrete_term(t, xs, CategoricalTerm) diff --git a/src/terms.jl b/src/terms.jl index b49a9027..f4d34cb0 100644 --- a/src/terms.jl +++ b/src/terms.jl @@ -201,17 +201,9 @@ Represents a continuous variable, with a name and summary statistics. # Fields * `sym::Symbol`: The name of the variable -* `mean::T`: Mean -* `var::T`: Variance -* `min::T`: Minimum value -* `max::T`: Maximum value """ -struct ContinuousTerm{T} <: AbstractTerm +struct ContinuousTerm <: AbstractTerm sym::Symbol - mean::T - var::T - min::T - max::T end width(::ContinuousTerm) = 1 diff --git a/test/terms.jl b/test/terms.jl index ba4cb2d0..5ddc7c3f 100644 --- a/test/terms.jl +++ b/test/terms.jl @@ -26,10 +26,6 @@ StatsModels.apply_schema(mt::MultiTerm, sch::StatsModels.Schema, Mod::Type) = t0 = concrete_term(t, [3, 2, 1]) @test string(t0) == "aaa" @test mimestring(t0) == "aaa(continuous)" - @test t0.mean == 2.0 - @test t0.var == var([1,2,3]) - @test t0.min == 1.0 - @test t0.max == 3.0 t1 = concrete_term(t, [:a, :b, :c]) @test t1.contrasts isa StatsModels.ContrastsMatrix{DummyCoding}