similar to: Help converting SAS Proc mixed to R code

Displaying 20 results from an estimated 10000 matches similar to: "Help converting SAS Proc mixed to R code"

2011 Apr 14
2
Conveting SAS Proc mixed to R code
Hello all, I am trying to teach myself R and replicate some previous SAS analysis. Could someone please help me translate the following SAS code into R. Proc mixed method=ml Class Group Treatment Stream Time Year; Model Logrpk=Treatment Time Treatment*Time; Random Group Stream (Group Treatment) Year(Time); Thank you to anyone that may help! -- View this message in context:
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
2009 Jun 25
0
lme gives different results to SAS Proc Mixed
http://www.nabble.com/file/p24211204/repeated.csv repeated.csv Dear all, I'm currently trying to replicate some Proc Mixed results using lme() and have a curious result I can't explain. The dataset is a repeated measures example where patients (each on one of several treatments) are measured over a number of days. Putting aside issues of the error covariance structure I'm using
2011 Oct 27
1
Proc Mixed to R
Hi All, I'm working with some SAS code to analyze an experiment set up as follows: 66 subjects (colonies) treated with a random treatment (1-8) and measured at three time points. The data structure looks like: input colony tmt y1 y2 y3; y=y1; date=*1*; output; y=y2; date=*2*; output; y=y3; date=*3*; output; datalines; 1
2011 Mar 12
0
Repeated measures in nlme vs SAS Proc Mixed with AR1 correlation structure
Hi all, I don't know if anyone has any thoughts on this. I have been trying to move from SAS Proc Mixed to R nlme and have an unusual result. I have several subjects measured at four timepoints. I want to model the within-subject correlation using an autoregressive structure. I've attached the R and SAS code I'm using along with the results from SAS. With R lme I get an estimate of
2006 Jun 30
0
SAS Proc Mixed and lme
I am trying to use lme to fit a mixed effects model to get the same results as when using the following SAS code: proc mixed; class refseqid probeid probeno end; model expression=end logpgc / ddfm=satterth; random probeno probeid / subject=refseqid type=cs; lsmeans end / diff cl; run; There are 3 genes (refseqid) which is the large grouping factor, with 2 probeids nested within each refseqid,
2012 Feb 06
3
Duplicate rows when I combine two data.frames with merge!
Hello all, First I have done extensive searches on this forum and others and nothing seems to work. So I decided to post thinking someone could point me to the write post or give me some help. I have drawn a 100 samples from a fictitious population (N=1000), and then randomly selected 25% of the 100 samples. I would like to now merge the data.frame from the 100 samples with the data.frame for
2012 Sep 21
1
translating SAS proc mixed into R lme()
Dear R users, I need help with translating these SAS codes into R with lme()? I have a longitudinal data with repeated measures (measurements are equally spaced in time, subjects are measured several times a year). I need to allow slope and intercept vary. SAS codes are: proc mixed data = survey method=reml; class subject var1 var3 var2 time; model score = var2 score_base var4 var5 var3
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)
2011 Aug 08
1
mixed model fitting between R and SAS
Hi al, I have a dataset (see attached), which basically involves 4 treatments for a chemotherapy drug. Samples were taken from 2 biopsy locations, and biopsy were taken at 2 time points. So each subject has 4 data points (from 2 biopsy locations and 2 time points). The objective is to study treatment difference.? I used lme to fit a mixed model that uses "biopsy.site nested within pid"
2012 Mar 09
0
pdMat class in LME to mimic SAS proc mixed group option? Group-specific random slopes
I would like to be able to use lme to fit random effect models In which some but not all of the random effects are constrained to be independent. It seems as thought the pdMat options in lme are a promising avenue. However, none of the existing pdMat classes seem to allow what I want. As a specific example, I would like to fit a random intercept/slope mixed model to longitudinal observations in
2007 Jun 05
1
lme vs. SAS proc mixed. Point estimates and SEs are the same, DFs are different
R 2.3 Windows XP I am trying to understand lme. My aim is to run a random effects regression in which the intercept and jweek are random effects. I am comparing output from SAS PROC MIXED with output from R. The point estimates and the SEs are the same, however the DFs and the p values are different. I am clearly doing something wrong in my R code. I would appreciate any suggestions of how I can
2001 Aug 09
0
converting BMDP 8V mixed model treatment to R ?
I am trying to translate a given BMDP 8V problem treatment to something approximately equivalent in nlme package (or base R, if sufficient). (Of course, it is not my goal to end there. I want to get access to the advanced flexibility of a more modern treatment.) Here is the problem statement in BMDP control language: /input title='Augenbewegungen'. variables=4.
2007 Apr 06
0
translating sas proc mixed to lme()
Hi All I am trying to translate a proc mixed into a lme() syntax. It seems that I was able to do it for part of the model, but a few things are still different. It is a 2-level bivariate model (some call it a pseudo-3-level model). PROC MIXED DATA=psdata.bivar COVTEST METHOD = ml; CLASS cluster_ID individual_id variable_id ; MODEL y = Dp Dq / SOLUTION NOINT; RANDOM Dp Dq / SUBJECT = cluster_ID
2005 May 04
1
lme versus proc mixed in SAS
Dear all, I am trying to simulate the null distribution for the likelihood ratio test statistic for testing 1 random effect versus no random effect. The asymptotic null distribution should be a mixture of a chi-squared distribution with 0 degrees of freedom and a chi-squared distribution with 1 degree of freedom. This means that I expect a point mass of 50% on 0 for the likelihood ratio
2006 Jun 30
1
lme and SAS Proc mixed
I am trying to use lme to fit a mixed effects model to get the same results as when using the following SAS code: proc mixed; class refseqid probeid probeno end; model expression=end logpgc / ddfm=satterth; random probeno probeid / subject=refseqid type=cs; lsmeans end / diff cl; run; There are 3 genes (refseqid) which is the large grouping factor, with 2 probeids nested within each refseqid,
2007 Oct 24
1
is there a similar function to perform repeated statements as in SAS PROC MIXED?
PROC MIXED is used to fit mixed effects model for correlated data. Usually we can use either a REPEATED statment or a RANDOM statement. The random statement is corresponding to lme function in R -- specifying a random effect term. The repeated statement actually directly specifies the covariance structure -- is there a similar function in R to do this? I currently want to specify a unstructured
2007 Apr 23
1
How to get LSMEANS from linear mixed model?
Hi there, I am trying to run simulations using R with linear mixed model (lme). There are two factors in my fixed effect model, educ (treatment and control) and mth (visit 1, 2, and 3). What I want to obtain is the estimated treatment difference (treatment - control) at visit 3, plus the standard error and p-value. This can be easily obtained in SAS using lsmeans or estimate statements, but I
2008 May 27
1
lm() output with quantiative predictors not the same as SAS
I am trying to use R lm() with quantitative and qualitative predictors, but am getting different results than those that I get in SAS. In the R ANOVA table documentation I see that "Type-II tests corresponds to the tests produced by SAS for analysis-of-variance models, where all of the predictors are factors, but not more generally (i.e., when there are quantitative predictors)." Is
2017 Sep 30
1
Converting SAS Code
> On 30 Sep 2017, at 14:22 , Robert Baer <rbaer at atsu.edu> wrote: > > > > On 9/29/2017 3:37 PM, Rolf Turner wrote: >> On 30/09/17 07:45, JLucke at ria.buffalo.edu wrote: >> >> <SNIP> >> >>> >>> The conceptual paradigm for R is only marginally commensurate with >>> that of >>> standard statistical