similar to: Help with lme and correlated residuals

Displaying 20 results from an estimated 2000 matches similar to: "Help with lme and correlated residuals"

2006 Mar 07
1
lme and gls : accessing values from correlation structure and variance functions
Dear R-users I am relatively new to R, i hope my many novice questions are welcome. I have problems accessing some objects (specifically the random effects, correlation structure and variance function) from an object of class gls and lme. I used the following models: yah <- gls (outcome~ -1 + as.factor(Trial):as.factor(endpoint)+
2006 Mar 02
0
Help with lme code
Dear R - Users I have some problems fitting a linear mixed effects model using the lme function (from the library nlme). A sample data is as shown at the bottom of this mail. I fit my linear mixed model using the following R code: bmr <-lme (outcome~ -1 + as.factor(endpoint)+ as.factor(endpoint):trt, data=datt, random=~-1 + as.factor(endpoint) +
2006 Jan 18
2
Help with mixed effects models
Dear R-users I have problems using lme The model i want to fit can be viewed as a two-level bivariate model Two-level bivariate: bivariate (S coded as -1,T coded as 1) endpoint within trial OR It can equivalently be considered as a three-level model.Three-level: endpoint within patient, patient within trial. My code tries to model the levels through a RANDOM statement and a
2006 Jan 30
5
Help with R: functions
Hello R-users I am new to R and trying to write some functions. I have problems writing functions that takes a data set as an arguement and uses variables in the data. I illustrate my problem with a small example below: sample data #------------------ visual24<-rnorm(30,3,5) visual52<-rt(30,7) dats<- data.frame(cbind(visual24,visual52)) remove(visual24, visual52)
2002 Dec 15
2
Interpretation of hypothesis tests for mixed models
My question concerns the logic behind hypothesis tests for fixed-effect terms in models fitted with lme. Suppose the levels of Subj indicate a grouping structure (k subjects) and Trt is a two-level factor (two treatments) for which there are several (n) responses y from each treatment and subject combination. If one suspects a subject by treatment interaction, either of the following models seem
2008 Dec 06
1
Questions on the results from glmmPQL(MASS)
Dear Rusers, I have used R,S-PLUS and SAS to analyze the sample data "bacteria" in MASS package. Their results are listed below. I have three questions, anybody can give me possible answers? Q1:From the results, we see that R get 'NAs'for AIC,BIC and logLik, while S-PLUS8.0 gave the exact values for them. Why? I had thought that R should give the same results as SPLUS here.
2010 Sep 17
1
lmer() vs. lme() gave different variance component estimates
Hi, I asked this on mixed model mailing list, but that list is not very active, so I'd like to try the general R mailing list. Sorry if anyone receives the double post. Hi, I have a dataset of animals receiving some eye treatments. There are 8 treatments, each animal's right and left eye was measured with some scores (ranging from 0 to 7) 4 times after treatment. So there are
2009 Oct 15
2
plotting/examining residuals of a mixed generalised linear model
Dear R users, I'm hoping that more experienced users will be able to assist me in examining the model fit of a mixed generalised linear model. The example using the data 'bacteria' within the MASS package will hopefully illustrate what I would like to acheive; library(MASS) library(nlme) attach(bacteria) # y being output and the trt - treatment group being an explanatory variable.
2004 Feb 05
2
Incomplete Factorial design
Hello, I am planning a study with the main point to evaluate the interaction of two treatments, but for ethical reasons one cell is empty, that with patients receaving no treatment at all Treatment B
2005 Nov 09
8
Element-by-element multiplication operator?
Is there an element-by-element multiplication in R, like the .* operator in Matlab? eg: A (2x3) B (2x3) C=A.*B C (2x3) C = [[a11*b11 a12*b12 a13*b13]; [a21*b21 a22*b22 a23*b23]] I can't find one... Thanks -Mike Gates
2009 Mar 03
1
R - need more memory, or rejection sampling algorithm doesn't work?
Hi all, I am trying to run rejection sampling for the quantity z11 in the function below. Unfortunately I can't simplify the function further so that z11 only appears once. Whenever I run the algorithm, R looks as if it is running it (no error messages or anything), but then nothing happens for minutes...how long should it take to run something like this in R? I have tried in in both linux
2009 Jun 01
4
stock openjdk vs. epel
If you have the epel repo installed and enabled during a yum update, you get java-1.6.0-openjdk-1.6.0.0-1.0.b12.el5.2 instead of the stock .b09 version. Is this intentional and desirable? I thought epel generally did not replace stock components with newer versions. -- Les Mikesell lesmikesell at gmail.com
2006 Feb 07
1
post-hoc comparisons following glmm
Dear R community, I performed a generalized linear mixed model using glmmPQL (MASS library) to analyse my data i.e : y is the response with a poisson distribution, t and Trait are the independent variables which are continuous and categorical (3 categories C, M and F) respectively, ind is the random variable. mydata<-glmmPQL(y~t+Trait,random=~1|ind,family=poisson,data=tab) Do you think it
2011 Feb 20
2
concatenate vector after strsplit()
ls is a list of character vectors created by strsplit() I want to concatenate the 1st 4 character elements of each list item as a new vector called file. I admit to being confused about list syntax even after numerous readings. Here's what I tried: ls <- list(c("Focused", "10k", "A12", "t04.tif", "+", "µm"),
2009 May 19
4
nlrwr package. Error when fitting the optimal Box-Cox transformation with two variables
Dear all: I'm trying to fit the optimal Box-Cox transformation related to nls (see the code below) for the demand of money data in Green (3th Edition) but in the last step R gives the next error message. Error en `[.data.frame`(eval(object$data), , as.character(formula(object)[[2]])[2]) : undefined columns selected. ?Any idea to solve the problem? Thanks in advance,
2006 Aug 24
1
how to constrast with factorial experiment
Hello, R users, I have two factors (treat, section) anova design experiment where there are 3 replicates. The objective of the experiment is to test if there is significant difference of yield between top (section 9 to 11) and bottom (section 9 to 11) of the fruit tree under treatment. I found that there are interaction between two factors. I wonder if I can contrast means from levels of
2011 May 03
3
ANOVA 1 too few degrees of freedom
I'm running an ANOVA on some data for respiration in a forest. I am having a problem with my degrees of freedom. For one of my variables I get one fewer degrees of freedom than I should. I have 12 plots and I therefore expected 11 degrees of freedom, but instead I got 10. Any ideas? I have some code and output below: > class(Combined.Plot) [1] "character" >
2011 Mar 07
5
Parsing question, partly comma separated partly underscore separated string
Dear R-list, I have a partly comma separated partly underscore separated string that I am trying to parse into R. Furthermore I have a bunch of them, and they are quite long. I have now spent most of my Sunday trying to figure this out and thought I would try the list to see if someone here would be able to get me started. My data structure looks like this, (in a example.txt file) Subject
2007 Mar 14
1
How to transform matrices to ANOVA input datasets?
Hello, R experts, I have a list called dataHP which has 30 elements (m1, m2, ..., m30). Each element is a 7x6 matrix holding yield data from two factors experimental design, with treatment in column, position in row. For instance, the element 20 is: dataHP[[20]] col1 col2 col3 trt1 trt2 trt3 [1,] 22.0 20.3 29.7 63.3 78.5 76.4 [2,]
2008 Oct 15
2
Network meta-analysis, varConstPower in nlme
Dear Thomas Lumley, and R-help list members, I have read your article "Network meta-analysis for indirect treatment comparisons" (Statist Med, 2002) with great interest. I found it very helpful that you included the R code to replicate your analysis; however, I have had a problem replicating your example and wondered if you are able to give me a hint. When I use the code from the