Skip to main content

All Questions

Tagged with
1 vote
0 answers
62 views

converting proc mixed to R [closed]

I have been trying to convert some PROC MIXED SAS code into R, but without success. The code is: ...
user20780's user avatar
  • 171
1 vote
1 answer
156 views

Mixed model without fixed intercept- Numerator df for Type II and III ANOVA (lmerTest vs Proc Mixed)

It comes to my attention that there is a discrepancy between lmerTest and Proc Mixed for the numerator degrees of freedom (df) for type II and III ANOVA. This only occurs for mixed model without fixed ...
one's user avatar
  • 270
1 vote
0 answers
240 views

lmer (R) and proc mixed (SAS)

Recently I have been working on replicating the results from package lmer in R to proc mixed in SAS for mixed modeling. There are multiple model structures that you ...
RinKaShiKiMo's user avatar
0 votes
0 answers
70 views

What is the equivalence of BETWITHIN degrees of freedom in mixed-effect models R?

As in the title. Let's assume I cannot use the Kenward-Roger or Satterthwaite method in mixed-effect models. I was told to use the BETWITHIN method. Now I switched to R. I can use any package I want. ...
Natalie's user avatar
  • 195
2 votes
0 answers
614 views

Equivalence of proc mixed SAS and R lme/lmer

I am looking at a 2x2 crossover study with period-specific baseline measurements and the according post-treatment outcome values Intervention (A or B) Sequence (AB or BA) Period (visit day1 and visit ...
TueBimet's user avatar
4 votes
4 answers
1k views

Why does lmer (unlike SAS) output a non-zero variance of random effect if it is also included as fixed: (1|site) + site?

(I am completely editing my post. The root question is the same, but I am now posting simulated data to illustrate my issue). I ran (I beleive) the same model in both proc mixed and R (lmer) but have ...
itch987's user avatar
  • 41
1 vote
0 answers
719 views

Multiple nest structure for lme()

I want to build a mixed-effects model with multiple nest structure in R. For example, month nested in year, day nested in year and year. Response variable Y is temperature and predictor variable X is ...
David Yang's user avatar
3 votes
1 answer
1k views

Fit a linear mixed model with only 1 group

In R, is it possible to force a lmer model with random effect to be fitted on data with only one level? We want to do this to keep the same model structure in rare case where our data only contains 1 ...
Philippe Massicotte's user avatar
3 votes
1 answer
6k views

glmer in R to recreate GLIMMIX from SAS

I am trying to recreate a PROC GLIMMIX command in R using glmer. Here is a link to the data (from SAS product support GLIMMIX documentation): https://support.sas.com/documentation/cdl/en/statug/63033/...
banwarp's user avatar
  • 31
2 votes
0 answers
428 views

Convert SAS syntax for mixed models for repeated measures in R

I want to attain a p-value in R using lme4 or nlme which has been obtained from mixed models (...
NewinStats's user avatar
1 vote
0 answers
282 views

Specify variance structure TOEP(1) in lmer for mixed model

How can I do the following job in R? More specific: how can I define type=toep(1) in R? ...
hongmei's user avatar
  • 11
2 votes
0 answers
759 views

Difference in SAS's proc mixed and R's lme4 (Standard Errors/Covariance Structure)

I'm trying to replicate a model created in SAS using lme4 in R. The SAS Model im using is; ...
Kabau's user avatar
  • 93
1 vote
0 answers
975 views

Asymptotic covariance matrix of the covariance parameters SAS versus lme

I am trying to obtain the asymptotic covariance matrix of the covariance parameters of a mixed-effects model using SAS and R In SAS, this matrix can easily be obtained by using the 'asycov' option in ...
Willem's user avatar
  • 93
14 votes
2 answers
7k views

Why does SAS PROC GLIMMIX give me VERY different random slopes than glmer (lme4) for a binomial glmm

I am a user more familiar with R, and have been trying to estimate random slopes (selection coefficients) for about 35 individuals over 5 years for four habitat variables. The response variable is ...
Nova's user avatar
  • 565