Displaying 20 results from an estimated 400 matches similar to: "Using Aggregate for Date"
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
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
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
2008 Jun 26
2
stuck on making a line graph across time, with 4 categories
I can't seem to find just what I'm looking for in R help, Everitt and
Hothorn HSAUR, Murrell's book, or the R graphics gallery at
http://addictedtor.free.fr/graphiques/. Probably not looking
efficiently, but anyway,
If my data look like this:
> head(data)
cat startyear studentid
1 other 2001 12
2 UHS 2001 17
3 Lourdes 2001 10
4
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
2006 Jan 04
4
HOWTO: Render partial in div
Hey-
I''m using ROR 1.0 and script.aculo.us 1.5.1. I''ve been trying
unsuccessfully to render a partial in a DIV, but can''t seem to get the
right combination of stuff to make it work. There seems to be a few
different ways of going about it. Right now I can render a partial.
What do I need to to render the partial in a div? Here is what it
looks like so far:
#
2011 May 24
4
Rails hates my recursive function
I''m trying to create a function that will take input in the form "a12345678"
and output text in the form "a12-34-5678" if and only if the input text is *
not* in the form "adam smith" The goal is to allow my users to enter either
names separated by a space, or the student id number into a single search
field and have the results be returned based on the
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
2009 Nov 12
1
Transforming a dataframe into a response/predictor matrix
I currently have a data frame whose rows correspond to each student and whose columns are different variables for the student, as shown below:
Lastname Firstname CATALOG_NBR Email StudentID EMPLID Start
1 alastname afirstname 1213 *@uark.edu 10295236 # 12/2/2008
2 anotherlastname anotherfirstname 1213 **@uark.edu ## 10295236 9/3/2008
Xattempts Q1
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
2006 Feb 20
1
need help on nlme()
Hello there,
I am using nlme() to fit a logistic mixed effect model on our data.
The outcome variable is binary.
I got the error when I wanted to add a group factor to my model.
My initial model is as below:
model.a <- nlme(response~ 1/(1 + exp( -intercept- u0 - slope*TIME -
u1*TIME)),
+ fixed=intercept+slope~1, random= u0+u1~1
|studentID,
2005 Mar 09
1
Flattening a list of data frames
Hello all,
Simple version of my problem:
I've got a list of data frames, where each data frame has the same
number of columns and the same column names. I'd like to flatten the
list into one large data frame. Is there an easy way to do this?
Quick example code:
a <- data.frame(x=c(1,2,3),y=c(5,7,9)
b <- data.frame(x=c(2,4,7,9),y=c(2,3,5,4))
z <- list(a,b)
# Do
2010 Aug 23
2
lmer() causes segfault
Hello lmer() - users,
A call to the lmer() function causes my installation of R (2.11.1 on
Mac OS X 10.5.8) to crash and I am trying to figure out the problem.
I have a data set with longitudinal data of four subsequent
performance measures of 1133 individuals nested in 88 groups. The data
is in long format. I hypothesize a performance increase for each
individual over time and intend to
2010 Aug 22
1
[LLVMdev] Request information about LLVM for research
Dear Sir,
As per request below, I want to use your LLVM project in my thesis and I
have no idea where to start and I couldn't find any information about how to
build my test programs with your infrastructure and get my required
information.
Is your tool is a testing tool? Can it accept program and test case as input
and output like the input test case is cover which branch and which
2003 Jul 08
2
NLME Fitted Values
Dear List:
I am having difficulties with the fitted values at different levels of a multilevel model. My data set is a series of student test scores over time with a total of 7,280 observations, 1,720 students nested witin 60 schools. The data set is not balanced.
The model was fit using
eg.model.1<-lme(math~year, random=~year|schoolid/childid, data=single).
When I call the random
2011 Jan 27
4
HLM Model
Hi
I am trying to convert SAS codes to R, but some of the result are quite
different from SAS.
When I ran proc mixed, I have an option ddfm=bw followed by the model. How
can I show this method in R?(I am thinking that this maybe the reason that I
can't get the similar results)
below is my SAS codes:
proc mixed data=test covtest empirical;
class pair grade team school;
model score = trt
2004 Sep 12
1
Discrepency between R and MlwiN
When playing around fitting unconditional growth models using R and MlwiN today, I produced two different sets of estimates that I can't reconcile and wondered if anyone here has an idea:
The data is two-level repeated measures data with measures nested within child. There are two measures per child. I've fit an unconditional growth model as in Singer and Willet (2003) that allows for
2010 Oct 13
2
LME with 2 factors with 3 levels each
Hello. I am new to R and new to linear mixed effects modeling. I am trying to model some data which has two factors. Each factor has three levels rather than continuous data. Specifically, we measured speech at Test 1, Test 2 and Test 3. We also had three groups of subjects: RepTP, RepNTP and NoRepNTP.
I am having a really hard time interpreting this data since all the examples I have seen
2010 Feb 10
1
Count variables by ID
Hello,
I have an education dataset and I'd like to know how to count the number of
courses each student has taken in a particular subject. For instance, say
the course codes for "History" are 20-26 & 31 and I have the following data
Student ID Course Code
1 16
1 17
1 21
1 31
2 10
2