similar to: model comparison and Wald-tests (e.g. in lmer)

Displaying 20 results from an estimated 10000 matches similar to: "model comparison and Wald-tests (e.g. in lmer)"

2011 Jul 26
0
How do you report lmer results?
Dear R-Gurus I am a PhD student from South Africa working on chimpanzee behaviour. I am looking at patterns of shade utilization and am using generalized linear mixed models to examine the effects of various factors on whether chimpanzees choose to spend time in the sun or shade. I realise that the lme4 package and the outputs of the lmer functions have been discussed ad nauseum but I have been
2005 Dec 05
1
extracting p-values from lmer()
Dear R users, I've been struggling with the following problem: I want to extract the Wald p-value from an lmer() fit, i.e., consider library(lme4) n <- 120 x1 <- runif(n, -4, 4) x2 <- sample(0:1, n, TRUE) z <- rnorm(n) id <- 1:n N <- sample(20:200, n, TRUE) y <- rbinom(n, N, plogis(0.1 + 0.2 * x1 - 0.5 * x2 + 1.5 * z)) m1 <- lmer(cbind(y, N - y) ~ x1 + x2 + (1 | id),
2006 Nov 28
3
Predicted values in lmer modeling
Dear All, I am working with linear mixed-effects models using the lme4 package in R. I created a model with the lmer function including some main effects, a two-way interaction and a random effect. Now I am searching for a way to save the predicted values for this model. As far as I can see, there is no command in lme4 to save the predicted values (like the predict(model) function in e.g.
2011 Sep 23
1
p values in coxph()
Hi, I'm interested in building a Cox PH model for survival modeling, using 2 covariates (x1 and x2). x1 represents a 'baseline' covariate, whereas x2 represents a 'new' covariate, and my goal is to figure out where x2 adds significant predictive information over x1. Ideally, I could get a p-value for doing this. Originally, I thought of doing some kind of likelihood ratio
2017 Jun 06
2
integrating 2 lists and a data frame in R
> On Jun 6, 2017, at 4:01 AM, Jim Lemon <drjimlemon at gmail.com> wrote: > > Hi Bogdan, > Kinda messy, but: > > N <- data.frame(N=c("n1","n2","n3","n4")) > M <- data.frame(M=c("m1","m2","m3","m4","m5")) > C <-
2017 Jun 06
0
integrating 2 lists and a data frame in R
Thank you David. Using xtabs operation simplifies the code very much, many thanks ;) On Tue, Jun 6, 2017 at 7:44 AM, David Winsemius <dwinsemius at comcast.net> wrote: > > > On Jun 6, 2017, at 4:01 AM, Jim Lemon <drjimlemon at gmail.com> wrote: > > > > Hi Bogdan, > > Kinda messy, but: > > > > N <-
2017 Jun 06
1
integrating 2 lists and a data frame in R
Simple matrix indexing suffices without any fancier functionality. ## First convert M and N to character vectors -- which they should have been in the first place! M <- sort(as.character(M[,1])) N <- sort(as.character(N[,1])) ## This could be a one-liner, but I'll split it up for clarity. res <-matrix(NA, length(M),length(N),dimnames = list(M,N)) res[as.matrix(C[,2:1])] <-
2005 Aug 08
1
get the wald chi square in binary logistic regression
hello, I work since a few time on R and i wanted to know how to obtain the Wald chi square value when you make a binary logistic regression. In fact, i have the z value and the signification but is there a script to see what is the value of Wald chi square. You can see my model below, Best regards, S??verine Erhel [Previously saved workspace restored] > m3 = glm(reponse2 ~ form +
2017 Jun 06
1
integrating 2 lists and a data frame in R
Here's another approach: N <- data.frame(N=c("n1","n2","n3","n4")) M <- data.frame(M=c("m1","m2","m3","m4","m5")) C <- data.frame(n=c("n1","n2","n3"), m=c("m1","m1","m3"), I=c(100,300,400)) # Rebuild the factors using M and N C$m <-
2017 Jun 06
0
integrating 2 lists and a data frame in R
Hi Bogdan, Kinda messy, but: N <- data.frame(N=c("n1","n2","n3","n4")) M <- data.frame(M=c("m1","m2","m3","m4","m5")) C <- data.frame(n=c("n1","n2","n3"), m=c("m1","m1","m3"), I=c(100,300,400))
2008 Aug 04
1
simulate data based on partial correlation matrix
Given four known and fixed vectors, x1,x2,x3,x4, I am trying to generate a fifth vector,z, with specified known and fixed partial correlations. How can I do this? In the past I have used the following (thanks to Greg Snow) to generate a fifth vector based on zero order correlations---however I'd like to modify it so that it can generate a fifth vector with specific partial
2017 Jun 06
4
integrating 2 lists and a data frame in R
Dear Bert, thank you for your response. here it is the piece of R code : given 3 data frames below --- N <- data.frame(N=c("n1","n2","n3","n4")) M <- data.frame(M=c("m1","m2","m3","m4","m5")) C <- data.frame(n=c("n1","n2","n3"),
2011 Jun 07
1
rgl: insert pauses in animation sequence / movie formats other than gif?
Two questions related to creating animated movies with rgl: 1. I've created an rgl scene with 5 different views I want to display in a movie, but I'd like to insert pauses (say, 5 seconds) at each view. How can I do this? I first created 5 userMatrix's, then play3d( par3dinterp( userMatrix=list(M1, M2, M3, M4, M5)), ,duration=2*60/5) ) then tried simply repeating each twice,
2011 Aug 13
1
Own R function doubt
Hi to all the people again, I was writting a simply function in R, and wish to collect the results in a excel file. The work goes as follows, Ciervos<-function(K1, K0, A, R,M,Pi,Hembras) {B<-(K1-K0)/A T1<-(R*Pi*Hembras-M*Pi+B)/(Pi-M*Pi+R*Pi*Hembras) P1<-Pi-B R1<-P1*Hembras*R M1<-P1*M T2<-(R1-M1+B)/(P1-M1+R1) P2<-P1-B R2<-P2*Hembras*R M2<-P2*M
2009 Apr 22
4
read.table or read.csv without row index?
Hello all, Probably my concepts about the data.frame and matrix and array in R are not clear, I need some clarification to help me understand them better. >M <- read.table("test1.csv",sep=",",row.names=NULL,header=T) gives me: M as M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 1 9 11 14 15 18 20 20 20 20 20 2 3 4 8 9 11 12 14 15 15 15 3 4 5 8 8 9 9 9 9 9 9 4 4
2017 Jun 06
2
integrating 2 lists and a data frame in R
Dear all, please could you advise on the R code I could use in order to do the following operation : a. -- I have 2 lists of "genome coordinates" : a list is composed by numbers that represent genome coordinates; let's say list N : n1 n2 n3 n4 and a list M: m1 m2 m3 m4 m5 2 -- and a data frame C, where for some pairs of coordinates (n,m) from the lists above, we have a
2017 Jun 06
0
integrating 2 lists and a data frame in R
Reproducible example, please. -- In particular, what exactly does C look ilike? (You should know this by now). -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Jun 5, 2017 at 6:45 PM, Bogdan Tanasa <tanasa at gmail.com>
2011 Sep 29
1
F and Wald chi-square tests in mixed-effects models
I have a doubt about the calculation of tests for fixed effects in mixed-effects models. I have read that, except in well-balanced designs, the F statistic that is usually calculated for ANOVA tables may be far from being distributed as an exact F distribution, and that's the reason why the anova method on "mer" objects (calculated by lmer) do not calculate the denominator df nor a
2006 Jun 14
2
lmer binomial model overestimating data?
Hi folks, Warning: I don't know if the result I am getting makes sense, so this may be a statistics question. The fitted values from my binomial lmer mixed model seem to consistently overestimate the cell means, and I don't know why. I assume I am doing something stupid. Below I include code, and a binary image of the data is available at this link:
2007 Nov 14
1
Name collisions
I am receiving a list of name collisions when I launch R as seen below. I'm new to R and any suggestion or help with how I can go about getting rid of these collisions would be greatly appreciated. % R R version 2.5.1 (2007-06-27) Copyright (C) 2007 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to