Giter VIP home page Giter VIP logo

grim's People

Contributors

hojsgaard avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

grim's Issues

Extract model parameters from dmod()

Great package Soren! And here comes the first issue:

I am mainly interested in the specification and parameters of the joint probability function of the best (gRim::stepwise.iModel) log-linear model. (I need the join probability function p(i) for later use.)

It seems impossible to get the parameters of the log-linear model from dModel returned by dmod()? As far as I see, dmod() calls fit.dModel() which in turn calls loglin().

loglin() has an argument param = FALSE. Would it be possible to set param = TRUE in fit.dModel() without breaking stuff?

Or am I seeing it wrong and is there a better way to extract the model specification?

Edit:

Parameters can be extracted from best model m.opt with the following code:
loglin(table = m.opt$datainfo$data, margin = m.opt$glist, param = TRUE)$param

Obviously it introduces extra computation, but works.

Now I am looking for a way to define log(p(i)). Would gRbase be the correct place for such a function? Input would be a dModel object.

Start stepwise dModel selection from baseline model

It seems the current implementation of gRim::stepwise.iModel() only supports starting model-selection from a full main effects model gRim::dmod(~.^1, data = data) if one wants to include all the variables in the selection procedure.

Is there any theoretical reason for this? In other words, couldn't we just as well start from log p(i) = mu and let AIC do the variable selection?

Reason I ask is that starting from a full main effects model limits model selection to low dimensional contingency tables. (e.g. table() will not work on data.frames with more than 31 binary columns since the amount of cells explodes to 2^31.)

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.