similar to: Extracting variance components from lmer

Displaying 20 results from an estimated 1000 matches similar to: "Extracting variance components from lmer"

2006 Feb 01
1
Scatterplot color options in CAR package?
Hi All. I'd like to change the default plotting colors used to construct a scatterplot with regression line in the CAR package. So, scatterplot(y~pred,smooth=FALSE, xlab="X", ylab="Y", lwd=2) If I change the palette (e.g., palette(ranbow(6)), I can change the color of the lines and points. However, the axes and labels remain in black (i.e., the first color in the
2008 Feb 05
1
Extracting level-1 variance from lmer()
All, How does one extract the level-1 variance from a model fit via lmer()? In the code below the level-2 variance component may be obtained via subscripting, but what about the level-1 variance, viz., the 3.215072 term? (actually this term squared) Didn't see anything in the archives on this. Cheers, David > fm <- lmer( dv ~ time.num*drug + (1 | Patient.new), data=dat.new )
2005 Oct 08
1
Two-factor ANOVA Help
Hello, I am trying to perform a two-factor ANOVA analysis using a blocking design with "Vol" as the response variable. My intent is to have "Rater" treated as the treatment variable and the "Pipe" treated as the blocking variable. I am reading and preparing my dataset using the following three lines of code: values <- read.table("filename",
2003 May 28
1
Bradley Terry model and glmmPQL
Dear R-ers, I am having trouble understanding why I am getting an error using glmmPQL (library MASS). I am getting the following error: iteration 1 Error in MEEM(object, conLin, control$niterEM) : Singularity in backsolve at level 0, block 1 The long story: I have data from an experiment on pairwise comparisons between 3 treatments (a, b, c). So a typical run of an experiment
2010 Feb 25
2
reducing data.frame
Hi All, Is there an easy way to reduce a data.frame to 1 'id' per row while keeping information from the other rows of that same variable, if applicable? e.g.: # data multi[1:15,] id r n wi wi.tau z k alliance a.rater eml treatment outcome o.rater german 1 100 0.2800000 44 41 21.72514 0.2876821 210 <NA> <NA> <NA> <NA>
2006 Nov 22
1
question about the "solve" function in library "Matrix"
Hi: I have some problems when I use the function "solve" function in a loop. In the following code, I have a diagonal martix "ttt" whose elements change in every iteration in a loop. I defined a "dpoMatrix"class before the loop so I do not need to define this class every time in the loop. The reason is to save some computing time. The code is below. The inverse
2007 May 11
1
Create an AR(1) covariance matrix
Hi All. I need to create a first-order autoregressive covariance matrix (AR(1)) for a longitudinal mixed-model simulation. I can do this using nested "for" loops but I'm trying to improve my R coding proficiency and am curious how it might be done in a more elegant manner. To be clear, if there are 5 time points then the AR(1) matrix is 5x5 where the diagonal is a constant
2007 Sep 14
2
How to remove index from list after split?
In the following example, how can I drop the group index from the list after I perform a split? n <- 3 nn <- 10 g <- factor(round(n * runif(n * nn))) x <- rnorm(n * nn) + sqrt(as.numeric(g)) df <- data.frame(g,x) df.s <- split(df,g) Thanks! Rick DeShon [[alternative HTML version deleted]]
2008 May 06
2
NLS plinear question
Hi All. I've run into a problem with the plinear algorithm in nls that is confusing me. Assume the following reaction time data over 15 trials for a single unit. Trials are coded from 0-14 so that the intercept represents reaction time in the first trial. trl RT 0 1132.0 1 630.5 2 1371.5 3 704.0 4 488.5 5 575.5 6 613.0 7 824.5 8 509.0 9
2003 Sep 25
0
mixing nested and crossed factors using lme
Hi all, I have an experiment where 5 raters assessed the quality of 24 web sites. (each rater rated each site once). I want to come up with a measure of reliability of the ratings for the web sites ie to what extent does each rater give the same (or similar) rating to each web site. My idea was to fit a random effects model using lme and from that, calculate the intraclass correlation as a
2008 Jan 25
1
nlsList (nlme) error
Hi All. I'm trying to run nlsList an getting an error that makes no sense to me. I have accuracy and reaction time data over many trials for each person (id) When I use nlsList code that is virtually identical to the example in the doc file I get the following error. I've tried everything I could think of and can't get around it. Any ideas what I'm doing wrong? **************
2009 Feb 24
1
replace zeros in a block diagonal matrix with small random values?
Hi All. Imagine you have a large block diagonal matrix. I'd like to replace the zeros in this matrix with small random (runif) numbers. Any ideas for a simple and efficient way to do this? Best regards, Rick DeShon
2009 Jul 13
3
Help With Fleiss Kappa
Hi All, I am using fleiss kappa for inter rater agreement. Are there any know issues with Fleiss kappa calculation in R? Even when I supply mock data with total agreement among the raters I do not get a kappa value of 1. instead I am getting negative values. I am using the irr package version 0.70 Any help is much appreciated. Thanks and Regards M [[alternative HTML version deleted]]
2007 Jun 26
3
inter-rater agreement index kappa
Is there a function that calculates the inter-rater agreement index (kappa) in R? Thanks ../Murli [[alternative HTML version deleted]]
2007 May 16
1
lmer error confusion
Hi All. I'm trying to run a simple model from Baayan, Davidson, & Bates and getting a confusing error message. Any ideas what I'm doing wrong here? # Here's the data..... Subj <- factor(rep(1:3,each=6)) Item <- factor(rep(1:3,6)) SOA <- factor(rep(0:1,3,each=3)) RT <- c(466,520,502,475,494,490,516,566,577,491,544,526,484,529,539,470,511,528) priming
2008 Oct 31
1
stratified kappa (measure agreement or interrater reliability)?
Hi All: Could anyone point me to a package that can calculate stratified kappa? My design is like this, 4 raters, 30 types of diagnosis scores, 20 patients. Each rater will rate each patient for each type of diagnosis score. The rater's value is nominal. I know I can measure the agreement between raters for each type of diagnosis score, e.g., calculate out 30 kappa values. My problem is I
2011 Feb 09
2
Generate multivariate normal data with a random correlation matrix
Hi All. I'd like to generate a sample of n observations from a k dimensional multivariate normal distribution with a random correlation matrix. My solution: The lower (or upper) triangle of the correlation matrix has n.tri=(d/2)(d+1)-d entries. Take a uniform sample of n.tri possible correlations (runi(n.tr,-.99,.99) Populate a triangle of the matrix with the sampled correlations Mirror the
2006 Jul 11
3
storing the estimates from lmer
Dear all, I'm trying to store/extract the mean& standard error of the fixed effects parameter and the variance of the random effects parameter from "lmer" procedure from mlmre4 package developed by bates n pinheiro. while storing fixed effects parameter is straight forward, the same is not true for storing the variance parameter of the random effects. kindly help me ~prabhu
2007 Jan 20
1
aov y lme
Dear R user, I am trying to reproduce the results in Montgomery D.C (2001, chap 13, example 13-1). Briefly, there are three suppliers, four batches nested within suppliers and three determinations of purity (response variable) on each batch. It is a two stage nested design, where suppliers are fixed and batches are random. y_ijk=mu+tau_i+beta_j(nested in tau_i)+epsilon_ijk Here are the
2006 Feb 13
1
Help scoring a matrix of item responses
Hi All. I'm new to R and trying to learn the data manipulation routines. At the moment, this is the one that has me stumped. Imagine n test takers provide responses to k multiple choice items. The result is a (n+1) x k matrix of responses where the first row of the matrix is a correct answer key. How could you transform the raw item responses into 1s (correct response) and 0s (incorrect