Code Monkey home page Code Monkey logo

Comments (10)

jo-fleck avatar jo-fleck commented on May 11, 2024 1

Quick follow up:

This does what I was after:
regtable(table2_C_tot; renderSettings = latexOutput(), estim_decoration = make_estim_decorator() )

Thanks to both of you!

(@jmboehm If you think it's useful, I'll be happy to help updating the readme.)

from regressiontables.jl.

jo-fleck avatar jo-fleck commented on May 11, 2024 1

Sorry for the confusion. To clarify and relate back to my questions:

How can I disable this function so that no stars are printed?

  • regtable(rr1, renderSettings = latexOutput(), estim_decoration = (v,p) -> "$v") # as suggested by @jmboehm

How can I adjust the significance rules (so that e.g. * p<0.1)?

  • regtable(rr1; renderSettings = latexOutput(), estim_decoration = make_estim_decorator() )

from regressiontables.jl.

jmboehm avatar jmboehm commented on May 11, 2024 1

Thanks. I think there is scope for documenting make_estim_decorator, so I'm going to leave this open.

from regressiontables.jl.

greimel avatar greimel commented on May 11, 2024

Can you try

estim_decoration = RegressionTables.make_estim_decorator(breaks=[], sym="")

and report back?

EDIT: If that throws an error, you might need to add some non-empty breaks (breaks = [0.0])

from regressiontables.jl.

jmboehm avatar jmboehm commented on May 11, 2024

As the readme says, estim_decoration is a function that takes the value and the p-statistic as argument, and produces the formatted string.

regtable(rr1,rr2,rr3,rr4; renderSettings = asciiOutput(), estim_decoration= (v,p) -> "$v")

therefore produces no formatting. The function that @greimel suggests above is a helper to produce such functions.

Generally, it's better to ask questions on how to use packages on Discourse and leave Github issues for bug reports and improvement suggestions.

from regressiontables.jl.

jo-fleck avatar jo-fleck commented on May 11, 2024

@greimel

It seems both throw the same error. (Am I including the command as you expect?)

regtable(table2_C_tot; renderSettings = latexOutput(), estim_decoration = RegressionTables.make_estim_decorator(breaks=[], sym=""))
ERROR: MethodError: no method matching make_estim_decorator(::Array{Float64,1}, ::Char; breaks=Any[], sym="")

regtable(table2_C_tot; renderSettings = latexOutput(), estim_decoration = RegressionTables.make_estim_decorator(breaks=[0.0], sym=""))
ERROR: MethodError: no method matching make_estim_decorator(::Array{Float64,1}, ::Char; breaks=[0.0], sym="")

Thanks a lot!

from regressiontables.jl.

jo-fleck avatar jo-fleck commented on May 11, 2024

@jmboehm

Thanks for the explanation and the Discourse link!

It might be useful to clarify and illustrate the (non-default) use of estim_decoration in the readme. (Maybe it's just helpful for me but since the use of 'significance stars' varies a lot, customization could be useful for a wider audience.)

from regressiontables.jl.

greimel avatar greimel commented on May 11, 2024

I am surprised that your solution works.

using RegressionTables, DataFrames, FixedEffectModels, RDatasets

df = dataset("datasets", "iris")
df[!,:SpeciesDummy] = categorical(df[!,:Species])

rr1 = reg(df, @formula(SepalLength ~ SepalWidth + fe(SpeciesDummy)))

regtable(rr1, renderSettings = latexOutput(), estim_decoration = make_estim_decorator())

produces stars for me (at least in the source code, probably they are omitted in the compiled document because stars cannot be displayed in text-mode). These two, however, don't:

regtable(rr1, renderSettings = latexOutput(), estim_decoration = make_estim_decorator([], "")
regtable(rr1, renderSettings = latexOutput(), estim_decoration = (v,p) -> "$v") # as suggested by @jmboehm 

I would follow @jmboehm's suggestion because make_estim_decorator is undocumented and thus subject to change.

from regressiontables.jl.

greimel avatar greimel commented on May 11, 2024

Ah, I see.

In that case better use

regtable(rr1, renderSettings = latexOutput(), estim_decoration = make_estim_decorator([0.01, 0.05, 0.1])

before make_estim_decorator is documented. Your version relies on the default value for the first argument which might change in the process of documenting the function.

from regressiontables.jl.

jo-fleck avatar jo-fleck commented on May 11, 2024

Agree - I saw these default settings it in the source code but it's definitely clearer/safer this way.

from regressiontables.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.