Giter VIP home page Giter VIP logo

Comments (3)

malawsky avatar malawsky commented on August 16, 2024 1

Hello,

Thank you for the quick reply.
That is almost it.
I am looking for the p value of the beta associated with AGE in m1.

For example, the p value associated with x below.

> x <- rnorm(100,0,1) + 1:100
> y <- rnorm(100,0,1) + 1:100
> summary(lm(y~x))

Call:
lm(formula = y ~ x)

Residuals:
    Min      1Q  Median      3Q     Max 
-3.4624 -1.0323 -0.0721  0.9766  3.0269 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)    
(Intercept) 0.431093   0.286746   1.503    0.136    
x           0.994736   0.004932 201.703   **<2e-16** *****

from lme4qtl.

variani avatar variani commented on August 16, 2024

Hi,

Thank you for using the package. Having a reproducible example would help to answer your question.

Here I put an example code to test the effect of AGE.

library(lme4qtl)
data(dat40, package = "lme4qtl")
dat40 <- na.omit(dat40) # to deal with error in anova.merMod(m0, m1) : models were not all fitted to the same size of dataset
m0 <- relmatLmer(trait1 ~ (1|ID), dat40, relmat = list(ID = kin2))
m1 <- relmatLmer(trait1 ~ AGE + (1|ID), dat40, relmat = list(ID = kin2))
anova(m0, m1)

Output:

> anova(m0, m1)
refitting model(s) with ML (instead of REML)
Data: dat40
Models:
m0: trait1 ~ (1 | ID)
m1: trait1 ~ AGE + (1 | ID)
   npar    AIC    BIC  logLik deviance Chisq Df Pr(>Chisq)
m0    3 942.93 953.10 -468.47   936.93
m1    4 944.72 958.27 -468.36   936.72 0.219  1     0.6398

Is that what you are looking for?

Best,
Andrey

from lme4qtl.

rbutleriii avatar rbutleriii commented on August 16, 2024

Hi there, I have a similar situation and I had a follow-up question. For the anova(), I noted it refit the models from REML to ML. Does this have an impact on the calculation of the fixed effect AGE in terms of changing the test statistic? Would the p-value in this case be more/less conservative than an REML value assuming such a value could be calculated?

from lme4qtl.

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.