similar to: mixed model fitting between R and SAS

Displaying 20 results from an estimated 3000 matches similar to: "mixed model fitting between R and SAS"

2011 Nov 18
1
[R-sig-ME] account for temporal correlation
[cc'ing back to r-help] On Fri, Nov 18, 2011 at 4:39 PM, matteo dossena <matteo.dossena at gmail.com> wrote: > Thanks a lot, > > just to make sure i got it right, > > if (using the real dataset) from the LogLikelihood ratio test model1 isn't "better" than model, > means that temporal auto correlation isn't seriously affecting the model? yes. (or
2005 Jun 28
1
How to extract the within group correlation structure matrix in "lme"
Dear R users, I fitted a repeated measure model without random effects by using lme. I will use the estimates from that model as an initial estimates to do multiple imputation for missing values of the response variable in the model. I am trying to extract the within group correlation matrix or covariance matrix. here is my code: f = lme(y ~x0+x1+trt+tim+x1:tim +tim:trt,random=~-1|subj,
2004 Sep 03
0
ML vs. REML with gls()
Hello listmembers, I've been thinking of using gls in the nlme package to test for serial correlation in my data set. I've simulated a sample data set and have found a large discrepancy in the results I get when using the default method REML vs. ML. The data set involves a response that is measured twice a day (once for each level of a treatment factor). In my simulated data set, I
2005 Aug 18
1
R equivalent to `estimate' in SAS proc mixed
Example: I have the following model > model <- lmer(response ~ time * trt * bio + (time|id), data = dat) where time = time of observation trt = treatment group (0-no treatment / 1-treated) bio = biological factor (0-absent / 1-present) and I would like to obtain an estimate (with standard error) of the change in response over time for individuals in the
2004 Oct 29
1
fitting linear mixed model for incomplete block design
Dear R developers and users: I have the following data, x is the response vaiable, nsample(individual) nested within trt, and subsample nested within nsample, I want to fit trt as fixed effect, and block, nsample(trt) as random effects using lme, is the following coding correct? dat$vgrp <- getGroups(dat, form = ~ 1|trt/nsample, level = 2) ge.lme1 <- lme(fixed=x~trt, data=dat,
2017 Oct 11
0
Converting SAS Code
I have no problem setting up my mixed model, or performing anova or lsmeans on my model?s outputs. However, performing lsd mean separation is giving me fits. So I do not have a problem when using two-way anova model. When using the code: fit.yield.add <- lm(data = ryzup, Yield ~ Rep + Nitrogen + Treatment) LSD.test(fit.yield.add, trt = "Nitrogen", alpha = 0.1, console = TRUE)
2010 Apr 14
3
pdMat
Alguien tiene experiencia en escribir una pdMat. Para aquellos que no lo recuerden son las matrices de covarianzas de los efectos aleatorios que ajusta la función lme de la librería nlme Estas matrices tiene especial importancia en aplicaciones de genética de poblaciones y en particular en mapeo de asociación. Pinheiro y Bates dicen que el usuario puede crear sus propias pdMat y sugiere como
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
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
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,]
2012 Jan 27
1
Confused with Student's sleep data description
I am confused whether Student's sleep data "show the effect of two soporific drugs" or Control against Treatment (one drug). The reason is the next: > require(stats) > data(sleep) > attach(sleep) > extra[group==1] numeric(0) > group [1] Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Trt Trt Trt Trt Trt Trt Trt Trt Trt [20] Trt Levels: Ctl Trt > sleep$group [1] 1 1 1 1 1
2008 Jun 04
1
"& not meaningful for factors"
I am trying to define groupings from levels of factor variables and this the warning message that R give "& not meaningful for factors". The nature of my task is this. I have a variable stage which has the levels (1B, 2A, 2B) - these are the AJCC TNM stages of cancer, and another variable diameter with factor levels ("=< 4", "4 - 6.5, > 6.5; limit values are
2010 Dec 01
2
Lattice dotplots
Dear, I have a dataset with 4 subjects (see ID in example), and 4 treatment (see TRT in example) which are tested on 2 locations and in 3 blocs. By using Lattice dotplot, I made a graph that shows the raw data per location and per bloc. In that graph, I would like to have a reference line per bloc that refers to the first treatment (T1). However, I can not find how to do that. I can make
2011 Apr 20
2
survexp with weights
Hello, I probably have a syntax error in trying to generate an expected survival curve from a weighted cox model, but I can't see it. I used the help sample code to generate a weighted model, with the addition of a "weights=albumin" argument (I only chose albumin because it had no missing values, not because of any real relevance). Below are my code with the resulting error
2008 Jan 25
1
Trouble setting up correlation structure in lme
Hi, I'm trying to set up AR(1) as a correlation structure in modeling some data (attached file data.txt in text format) with lme, but have trouble getting it to work. Incent, Correctness, and Oppor are 3 categorical variables, Beta is a response variable, and Time is an equally-spaced variable with 6 time points (treated as a categorical variable as well). Basically I want to model the
2008 Mar 05
1
Question on "assign(paste.."
Hello, I'm having trouble in using "assign(paste ..." command . I could create several dataframes following trinomial distribution using it but it could not be used to check their row means of the created dataframe. For example, the following works: probTrt=matrix(0,4,3); probTrt; #malf, death, normal probTrt[1,]=c(0.064,0.119,0.817);#for Trt 1 probTrt[2,]=c(0.053,0.125,0.823);#for
2005 Feb 22
1
Re: R-help Digest, Vol 24, Issue 22
You need to give the model formula that gave your output. There are two sources of variation (at least), within and between locations; though it looks as though your analysis may have tried to account for this (but if so, the terms are not laid out in a way that makes for ready interpretation. The design is such (two locations) that you do not have much of a check that effects are consistent over
2012 May 29
2
use xyplot to plot mean and CI by groups
Dear R users, I am trying to use xyplot to draw group mean and CI. The following is the sample code. But I want: 1. Use different colors and symbols to draw individual points, CI and the lines connect group means from different time points; 2. Add jitters to x axis to allow CIs not be overlapped Could anyone modify the attached code to achieve this? Thanks library(lattice)
2011 Dec 11
2
multiple comparison of interaction of ANCOVA
Hi there, The following data is obtained from a long-term experiments. > mydata <- read.table(textConnection(" + y year Trt + 9.37 1993 A + 8.21 1995 A + 8.11 1999 A + 7.22 2007 A + 7.81 2010 A + 10.85 1993 B + 12.83 1995 B + 13.21 1999 B + 13.70 2007 B + 15.15 2010 B + 5.69 1993 C + 5.76 1995 C + 6.39 1999
2005 Dec 09
1
lmer for 3-way random anova
I have been using lme from nlme to do a 3-way anova with all the effects treated as random. I was wondering if someone could direct me to an example of how to do this using lmer from lme4. I have 3 main effects, tim, trt, ctr, and all the interaction effects tim*trt*ctr. The response variable is ge. Here is my lme code: dat <-