search for: mathach

Displaying 6 results from an estimated 6 matches for "mathach".

Did you mean: match
2012 May 12
2
Why can we combine design matrix and data-frame in R?
...ally fail? (that's something I would like to catch and avoid...) Thank you! ------------------------------- The data is located at: http://www.ling.uni-potsdam.de/~vasishth/book.html In the section: downloadable errata, code, datasets •ERRATA •Corrected Pages •VasishthBroebook.R •beauty.txt •mathachieve.txt •mathachschool.txt ------------------------------ MathAchieve <- read.table("mathachieve.txt") colnames(MathAchieve) <- c("School", "Minority", "Sex", "SES", "MathAch", "MEANSES") head(MathAchieve) MathAchSch...
2004 Jan 07
2
problem assigning an array to a variable in a data frame
Dear r-devel list members, Dirk Eddelbuettel brought the following problem to my attention. The code is abstracted from the appendix on mixed models from my R and S-PLUS Companion: > set.seed(12345) # for reproducibility > library(nlme) Loading required package: lattice > data(MathAchieve) > data(MathAchSchool) > attach(MathAchieve) > mses <- tapply(SES, School, mean) > detach(MathAchieve) > Bryk <- as.data.frame(MathAchieve[, c("School", "SES", "MathAch")]) > names(Bryk) <- c("school", "ses", &qu...
2002 May 02
2
problem with lme in nlme package
...tialize > for (sc in unique(school)) { + meanses[school==sc] <- mean(ses[school==sc]) + cses[school==sc]<-ses[school==sc]- meanses[school==sc] + } > Bryk$cses <- cses > Bryk$meanses <- meanses > Bryk[1:10,] school ses mathach sector cses meanses 1 1224 0.022 4.583 public 0.456383 -0.43438 2 1224 0.332 20.349 public 0.766383 -0.43438 3 1224 0.372 6.714 public 0.806383 -0.43438 4 1224 -0.078 16.405 public 0.356383 -0.43438 5 1224 -0.158 17.898 public 0.276383 -0...
2003 Jun 25
3
joining columns as in a relational database
...classic example of such data are test scores of students grouped into schools. We may wish to model the scores as functions of both student-level covariates and school-level covariates. Such data are often organized in a multi-table format with a separate table for each level of information. The MathAchieve and MathAchSchool data frames in the nlme package are examples of such an organization. The HLM software requires the data to be organized like this. To fit a model in R we need to create a composite table by "joining" the columns of the student-level and school-level tables, in the...
2012 Jan 18
0
examine grouped data lmList
...he thing is that I don't know how to specify that groups are in v5, where to put in the lmList statement |v5) By the way, following Fox pdf I was trying as well to group my data, as this example: /attach(Bryk) cat <- sample(unique(school[sector==?Catholic?]), 20) Cat.20 <- groupedData(mathach ~ ses | school, data=Bryk[is.element(school, cat),]) pub <- sample(unique(school[sector==?Public?]), 20) Pub.20 <- groupedData(mathach ~ ses | school, data=Bryk[is.element(school, pub),])/ what am I doing wrong? cat <- sample(unique(data$v5[v6=0,]), 20) But Error in NextMethod("[&...
1998 Mar 05
1
User time and system time
...compared on the same machine but R is much slower - like an order of magnitude - than S-PLUS on this problem. It looks curious to me when I run system.time() on this that timing vector shows almost no user time but a huge amount of system time. R> system.time(assign("fm2", + lme(MathAch ~ MEANSES*CSES + Sector + CSES:Sector, ttt, ~ CSES | School, + RML = TRUE ))) iteration = 0 Step: [1] 0 0 0 Parameter: [1] 2.61400 0.16608 3.88195 Function Value [1] 44964 Gradient: [1] -0.014379 -0.143176 -0.646558 iteration = 1 Step: [1] 0.002888 0.028756 0.129857 Parameter:...