similar to: NLME Fitted Values

Displaying 20 results from an estimated 8000 matches similar to: "NLME Fitted Values"

2003 Jun 25
2
NLME Covariates
Dear list In HLM, one can specify a covariate at one of the "levels". For example, if the data structure are repeated observations nested within students nested within schools, school size might be a covariate that is used at level 3, but not at the other levels. In HLM this is rather easy to do. However, how can one specify a covariate in R for only one of the levels? I have a
2006 Mar 29
1
Lmer BLUPS: was(lmer multilevel)
Paul: I may have found the issue (which is similar to your conclusion). I checked using egsingle in the mlmRev package as these individuals are strictly nested in this case: library(mlmRev) library(nlme) fm1 <- lme(math ~ year, random=~1|schoolid/childid, egsingle) fm2 <- lmer(math ~ year +(1|schoolid:childid) + (1|schoolid), egsingle) Checking the summary of both models, the output is
2006 Oct 20
1
Translating lme code into lmer was: Mixed effect model in R
This question comes up periodically, probably enough to give it a proper thread and maybe point to this thread for reference (similar to the 'conservative anova' thread not too long ago). Moving from lme syntax, which is the function found in the nlme package, to lmer syntax (found in lme4) is not too difficult. It is probably useful to first explain what the differences are between the
2010 Apr 01
2
Adding regression lines to each factor on a plot when using ANCOVA
Dear R users, i'm using a custom function to fit ancova models to a dataset. The data are divided into 12 groups, with one dependent variable and one covariate. When plotting the data, i'd like to add separate regression lines for each group (so, 12 lines, each with their respective individual slopes). My 'model1' uses the group*covariate interaction term, and so the coefficients
2011 Sep 16
3
Help writing basic loop
Hello, I would like to write a loop to 1) run 100 linear regressions, and 2) compile the slopes of all regression into one vector. Sample input data are: y1<-rnorm(100, mean=0.01, sd=0.001) y2<-rnorm(100, mean=0.1, sd=0.01) x<-(c(10,400)) #I have gotten this far with the loop for (i in 1:100) { #create the linear model for each data set model1<-lm(c(y1[i],y2[i])~x)
2006 Oct 08
1
Simulate p-value in lme4
Dear r-helpers, Spencer Graves and Manual Morales proposed the following methods to simulate p-values in lme4: ************preliminary************ require(lme4) require(MASS) summary(glm(y ~ lbase*trt + lage + V4, family = poisson, data = epil), cor = FALSE) epil2 <- epil[epil$period == 1, ] epil2["period"] <- rep(0, 59); epil2["y"] <- epil2["base"]
2004 Jul 02
1
Problem in lme4
Dear List: I was able to run the following in nlme successfully, but the same model and code (same dataset) failed to run in lme4 and gave me the error message below. Any thoughts? lme(math~year, data=egsingle, random=~year|schoolid/childid) Error in lme(formula = math ~ year, data = egsingle, random = structure(list( : Unable to invert singular factor of downdated X'X
2009 Mar 31
1
using "substitute" inside a legend
Hello list, I have a linear regression: mylm = lm(y~x-1) I've been reading old mail postings as well as the plotmath demo and I came up with a way to print an equation resulting from a linear regression: model = substitute(list("y"==slope%*%"x", R^2==rsq), list(slope=round(mylm$coefficients[[1]],2),rsq=round(summary(mylm)$adj.r.squared, 2))) I have four models and I
2011 Feb 05
1
very basic HLM question
Hi everyone, I need to get a between-component variance (e.g. random effects Anova), but using lmer I don't get the same results (variance component) than using random effects Anova. I am using a database of students, clustered on schools (there is not the same number of students by school). According to the ICC1 command, the interclass correlation is .44 > ICC1(anova1) [1] 0.4414491
2012 Jun 19
1
Possible bug when using encomptest
Hello R-Help, ----------------------------------------------------------------------------------------------------------------------------------------- Issues (there are 2): 1) Possible bug when using lmtest::encomptest() with a linear model created using nlme::lmList() 2) Possible modification to lmtest::encomptest() to fix confusing fail when models provided are, in fact, nested. I have
2005 Jan 23
4
survreg: fitting different location parameters
Hi R-Help! My question: I have lifetime/failure data of machines with different stress levels and i think an weibull/extreme value distribution would fit this data. So I did: model1 <- survreg(Surv(lfailure)~stress,data=steel,dist="extreme") (where lfailure=log(failure)) Now I would like to do a likelihood ratio test to test the hypothesis H0: location parameters of the
2011 Jun 01
1
How to write random effect in MCMCglmm
Hi All, The data set that I have is a cluster data, and I want to run a HLM mixed model with multi-level response. Here is my data set: response: - Level (num: 1, 2, 3, 4, 5 - 5 levels) Covariates: - Type (Factor: A, B, C - 3 levels) - yr (num: 2006, 2007, ...) - Male (num: 0=not Male, 1=Male - 2 levels) - Ethnicity (Factor: A, B, H, ..., - 7 levels) - ELL (num: 0, 1, - 2
2008 Apr 22
1
lmer model building--include random effects?
Hello, This is a follow up question to my previous one http://tolstoy.newcastle.edu.au/R/e4/help/08/02/3600.html I am attempting to model relationship satisfaction (MAT) scores (measurements at 5 time points), using participant (spouseID) and couple id (ID) as grouping variables, and time (years) and conflict (MCI.c) as predictors. I have been instructed to include random effects for the
2017 Aug 16
4
{nlme} Question about modeling Level two heteroscedasticity in HLM
Hello dear uesRs, I am working on modeling both level one and level two heteroscedasticity in HLM. In my model, both error variance and variance of random intercept / random slope are affected by some level two variables. I found that nlme is able to model heteroscedasticity. I learned how to use it for level one heteroscedasticity but don't know how to use it to model the level
2005 Jul 15
1
nlme and spatially correlated errors
Dear R users, I am using lme and nlme to account for spatially correlated errors as random effects. My basic question is about being able to correct F, p, R2 and parameters of models that do not take into account the nature of such errors using gls, glm or nlm and replace them for new F, p, R2 and parameters using lme and nlme as random effects. I am studying distribution patterns of 50 tree
2009 Feb 28
1
lme4 and Variable level detection
I am making a little GUI for lme4, and I was wondering if there is a function that automatically detects on which level every variable exists. Furtheremore I got kind of confused about what a random effects model actually calculates. I have some experience with commercial software packages for multilevel analysis, like HLM6, and I was surprised that lme4 does not require the user to specify the
2008 Jun 15
2
R vs SAS and HLM on multilevel analysis- basic question
Hi R users! I am trying to learn some multilevel analysis, but unfortunately i am now very confused. The reason: http://www.ats.ucla.edu/stat/hlm/seminars/hlm_mlm/mlm_hlm_seminar.htm http://www.ats.ucla.edu/stat/sas/seminars/sas_mlm/mlm_sas_seminar.htm and MlmSoftRev. pdf from mlmRev package. >From what i see, the first two links seem to declare the level one variable as a random part (i
2003 Jun 25
2
within group variance of the coeficients in LME
Dear listers, I can't find the variance or se of the coefficients in a multilevel model using lme. I want to calculate a Chi square test statistics for the variability of the coefficients across levels. I have a simple 2-level problem, where I want to check weather a certain covariate varies across level 2 units. Pinheiro Bates suggest just looking at the intervals or doing a rather
2010 Aug 26
1
Random slopes in lmer
Hi I want to extract the random slopes from a lmer (I am doing a random regression), but are the answers obtained from ranef or coef? My model is: mod1<-lmer(B~ A +(A|bird), family=quasibinomial) And I want to obtain a slope for each individual bird but am not sure which output I need and can't find the answer anywhere. Thanks Sam Dr Samantha Patrick EU INTERREG Post Doc Davy 618
2005 Dec 22
2
bVar slot of lmer objects and standard errors
Hello, I am looking for a way to obtain standard errors for emprirical Bayes estimates of a model fitted with lmer (like the ones plotted on page 14 of the document available at http://www.eric.ed.gov/ERICDocs/data/ericdocs2/content_storage_01/0000000b/80/2b/b3/94.pdf). Harold Doran mentioned (http://tolstoy.newcastle.edu.au/~rking/R/help/05/08/10638.html) that the posterior modes' variances