Comments (4)
Great that you found a way to do this.
from glmmadaptive.
from glmmadaptive.
No I actually need the standard errors in the original scale (A bit of context: my professor uses stata and stata shows standard errors, But I am doing the assignment in R and I need to show him the standard error).
Would you please dictate a way to transform the output (that is on log-cholesky scale) to the original scale?
from glmmadaptive.
Here's a solution to this issue from Cross Validated using delta method to get variance-covariance matrix original scale from the log-cholesky scale.
library("numDeriv")
# estimated covariance matrix of random effects
D <- fm$D
# transform from covariance matrix to entries of cholesky factor with
# log-transformed main diagonal
D_chol_entries <- GLMMadaptive:::chol_transf(D)
D_chol_to_D <- function(x) {
# transform from entries of cholesky factor with log-transformed main diagonal
# to covariance matrix
D <- GLMMadaptive:::chol_transf(x)
D[upper.tri(D, diag = TRUE)]
}
J <- jacobian(D_chol_to_D, D_chol_entries)
# estimated covariance matrix of D_chol_entries
V_chol <- vcov(fm, parm = "var-cov")
# estimated covariance matrix of entries of D
V <- J %*% V_chol %*% t(J)
se <- sqrt(diag(V))
from glmmadaptive.
Related Issues (20)
- Implement a refit function HOT 3
- Behaviour of weights in GLMMadaptive HOT 2
- emmeans functions in two-part models: only gives output for "main" model HOT 2
- Possibility to evaluate marginal log-likelihood HOT 2
- Error in chol.default(X[[i]], ...) HOT 1
- Random intercept only for zero-inflated portion, not count portion HOT 1
- Documentation contains dead links HOT 1
- May I know how to get the effect size of a two-part mixed effects model? HOT 4
- emmeans produces strange (wrong) estimates from beta regression after mixed_model HOT 1
- Adding "sandwich" argument to mixed_model HOT 1
- Error: No glance method for objects of class MixMod HOT 6
- Issue with data prep for backward formulation HOT 4
- A problem with the censored.normal() family? HOT 2
- emmeans support doesn't return the link HOT 4
- Predict function for hurdle.lognormal response
- hurdle.lognormal() needs to trigger error message when zi_fixed is omitted HOT 1
- More than one random effect? HOT 2
- predict(type = 'subject_specific') not working in model with not positive definite Hessian matrix HOT 3
- "Error in eigen(Y, symmetric = TRUE): infinite or missing values in 'x'" 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 glmmadaptive.