Comments (2)
There are a couple of issues here.
The first is that, no, sim doesn't know how to reconstruct the interaction terms using model matrix. I haven't invested enough time in glimmer. The support tools like link and sim don't know it exists and so can't handle its foibles.
The second is that you've actually stumbled onto an interesting bug with how map objects work. Because of the glimmer naming convention, map is mistaking the interaction parameter name for a vector of parameters, due to the weird abstraction layer that I coded into it, so one can do vectors of coefficients with optim. I'll put this on the fix list.
Thanks.
from rethinking.
Ah thanks... I had actually been puzzled but he "b_" in front of the variable name, but that makes more sense.
As feedback, I really like using glimmer as a starting point for building models and would love to see it polished so it fits together with link and sim – although I can see how much time that would take. In the shorter term if the functions for creating the dataset that glimmer uses were pulled out and made accessible then it would be nice to be able to use them manually when running sim, so this might then be possible:
preds <- make_data_and_munge_names_function_from_glimmer(expand.grid(x=-1:1, z=-1:1))
sim(lm2.fit, data=preds)
from rethinking.
Related Issues (20)
- Can we have an imputation example where the outcome has missing values?
- errata --- small typo in Overthinking: Non-centered parameterization of the multilevel model
- Allow = in place of <- assignment operator in model specification to better mimic mathematical notation HOT 4
- Overthinking: Binomial maximum entropy (errata) p. 312
- How can I add ifelse statement inside ulam? HOT 3
- modelling the result of manipulating confounders in advanced varying effect
- Undeclared MuMIn dependency for AICc?
- Ulam/cmdstan errors HOT 11
- processx error with ulam() HOT 5
- Multivariate linear ecological community models
- ulam: save> and log_lik clash with one another HOT 1
- 2nd edition errata: p. 445, discussion of Fig. 14.5 describes 1st edition Fig. 13.5
- Feature request: Add a template for shifted lognormal distribution HOT 2
- Does the rethinking package work using the newest version of R - 4.2.2? HOT 1
- Nevermind HOT 2
- Eliminating variable breaks ulam model HOT 2
- Smooth functions of a variable - modeling syntax HOT 2
- Problem with R code 9.14 on Mac OS
- problems loading rethinking HOT 1
- Zero Inflated Negative Binomial Model HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rethinking.