search for: mlmrev

Displaying 20 results from an estimated 60 matches for "mlmrev".

2011 Mar 05
2
lattice: drawing strips for single-panel plots
The strip argument to panel.xyplot seems to be ignored for single-panel plots. Here is an example: data(Chem97, package = "mlmRev") myStrip <- function(...) { ltext(.5, .5, 'strip text') } densityplot(~ gcsescore, data = Chem97, strip=myStrip) The figure is printed with no strip. The strip.default documentation suggests that Deepayan intended this behavior. Still, it would help to be able to use the...
2007 Jun 10
1
{nlme} Multilevel estimation heteroscedasticity
...nlme package and the weigths-parameter. Let's say that I hypothesize that the exam score of students (normexam) is influenced by their score on a standardized LR test (standLRT). Students are of course nested in "schools". These variables are contained in the Exam-data in the mlmRev package. library(nlme) library(mlmRev) lme(fixed = normexam ~ standLRT, data = Exam, random = ~ 1 | school) If I want to model only a few categories of variance, all works fine. For instance, should I (for whatever reason) hypothesize that the variance on the normexam-scores is larger in m...
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 exactly the...
2006 Jul 30
2
Question about data used to fit the mixed model
Hi everyone, I would like to ask a question regarding to the data used to fit the mixed model. I wonder that, for the response variable data used to fit the mixed model (either via "spm" or "lme"), we must have several observations per subject (i.e. Yij, i = 1,..,M, j = 1,.., ni) or it can be just one observation per subject (i.e. Yi, i = 1,...,M). Since we have to
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 don't know sas synthax, but i think i am right ) while Mr. Bates' pdf says that a grouping variable is the random part of the model, though both models, use roughly the same type...
2007 Mar 09
0
time demean model matrix
...in 1:3){ mat2[,i] <- mat[,i] - ave(mat[,i], mat$id) } # Or use mapply as follows mat[,1:3]-mapply(ave, mat[,1:3], MoreArgs=list(mat$id)) Both work, but they require that the model matrix is explictly created and then used in the regression. For example, assume I am using the star data in the mlmRev package data(star, package='mlmRev') I would first need to explictly create the model matrix for the fixed effects as follows and then use the strategy above to de-mean this matrix. mat <-model.matrix(lm(math~ -1 + sch, star)) Of course in R, this is rather inefficient as one gen...
2006 Nov 28
1
Slight discrepancy between predict.lm() and all.effects()
In the course of exploring response prediction, I stumbled upon a small discrepancy between the CIs produced by predict.lm() and all.effects() require(mlmRev) require(effects) hsb.lm <- lm(mAch ~ minrty * sector, Hsb82) hsb.new <- data.frame( minrty = rep(c('No', 'Yes'), 2), sector = rep(c('Public', 'Catholic'), each = 2)) hsb.eff <- all.effects(hsb.lm) cbind( hsb.new, predict(hsb.lm, hsb.new,...
2008 Aug 08
1
Lattice: regression lines within grouped xyplot panels
Dear community, I am looking for a possibility to draw 'regression lines' instead of 'smooth' lines in grouped xyplots. The following code should give you a small example of the data structure. library(lattice) data(Gcsemv, package = "mlmRev") # Creates artificial grouping variable ... Gcsemv$Groups <- ifelse(as.numeric(as.character(Gcsemv$school))>65000, "Group1", "Group2") xyplot(written ~ course | gender, data = Gcsemv, type = c("g", "p", "smooth"),...
2012 Aug 08
3
Can not find lme
...'Content type 'application/x-gzip' length 1453067 bytes (1.4 Mb)opened URL==================================================downloaded 1.4 Mb The downloaded packages are in /var/folders/yx/l4kkhz8j24179y5vq0hp9md00000gp/T//Rtmpqsa0o1/downloaded_packagesalso installing the dependencies ‘mlmRev’, ‘MEMSS’, ‘sfsmisc’, ‘MatrixModels’ trying URL 'http://cran.csiro.au/bin/macosx/leopard/contrib/2.14/mlmRev_1.0-1.tgz'Content type 'application/x-gzip' length 1832388 bytes (1.7 Mb)opened URL==================================================downloaded 1.7 Mb trying URL 'http://...
2009 Sep 23
1
More naive questions: HLM6 comparisons? what is a "stack imbalance" in lmer? does lmer center variables?
...mer is re-calculating some big matrix results, I suppose that could explain it. 2. What does "stack imbalance in .Call" mean in lmer? Here's why I ask. Searching for comparisons of lmer and HLM, I went to CRAN & I checked this document: http://cran.r-project.org/web/packages/mlmRev/vignettes/MlmSoftRev.pdf I *think* these things are automatically generated. The version that's up there at this moment (mlmRev edition 0.99875-1) has pages full of the error message: stack imbalance in .Call, Were those always there? I don't think so. What do they mean? 3. In the...
2006 Feb 16
1
help downloading lme4 from CRAN
...Paths()[1], available=a, dependencies=TRUE)}) trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/PACKAGES' Content type `text/plain; charset=iso-8859-1' length 26129 bytes opened URL downloaded 25Kb also installing the dependencies 'Matrix', 'latticeExtra', 'mlmRev' trying URL `http://cran.r-project.org/bin/windows/contrib/2.0/Matrix_0.95-5.zip' Error in download.file(url, destfile, method, mode = "wb") : cannot open URL `http://cran.r-project.org/bin/windows/contrib/2.0/Matrix_0.95-5.zip' In addition: Warning message: cannot...
2006 Jan 12
1
Multilevel models with mixed effects in R?
Group, I am new to R. In my work as a program evaluator, I am regularly asked to estimate effect sizes of prevention/intervention and educational programs on various student outcomes (e.g. academic achievement). In many cases, I have access to data over three or more time periods (e.g. growth in proficiency test scores). I usually have multiple independent and dependent variables in each
2010 Mar 12
1
Problem installing new packages
...sums checked package 'logspline' successfully unpacked and MD5 sums checked package 'mapproj' successfully unpacked and MD5 sums checked package 'maps' successfully unpacked and MD5 sums checked package 'MEMSS' successfully unpacked and MD5 sums checked package 'mlmRev' successfully unpacked and MD5 sums checked package 'RColorBrewer' successfully unpacked and MD5 sums checked The downloaded packages are in C:\Users\Owner\AppData\Local\Temp\RtmpvYKBW7\downloaded_packages Thanks, Jim Burke
2006 Mar 03
3
Peculiar timing result
...s considerably slower on a dual-core Athlon 64 using Goto's multithreaded BLAS than on a single-core processor. Here is the timing on a single-core Athlon 64 3000+ running under today's R-devel with version 0.995-5 of the Matrix package. > library(Matrix) > data(star, package = 'mlmRev') > system.time(fm1 <- lmer(math~gr+sx+eth+cltype+(yrs|id)+(1|tch)+(yrs|sch), star, control = list(nit=0,grad=0,msV=1))) 0 241720.: 1.16440 0.335239 0.00000 1.78732 0.867209 0.382318 0.00000 1 239722.: 1.94952 5.00000e-10 0.00933767 1.65999 0.858003 0.341520 0.00908757...
2007 Sep 20
1
Bug with Cor(..., method='spearman") and by() (PR#9921)
...ARY=3DEnglish_United States.1252;LC_NUMERIC=3DC;LC_TIME=3DEnglish_United States.1252 attached base packages: [1] "stats" "graphics" "grDevices" "utils" "datasets" "methods" "base" =20 other attached packages: mlmRev lme4 Matrix lattice=20 "0.995-1" "0.99875-2" "0.99875-3" "0.15-4"=20
2006 Aug 10
5
Variance Components in R
Hi, I'm trying to fit a model using variance components in R, but if very new on it, so I'm asking for your help. I have imported the SPSS database onto R, but I don't know how to convert the commands... the SPSS commands I'm trying to convert are: VARCOMP RATING BY CHAIN SECTOR RESP ASPECT ITEM /RANDOM = CHAIN SECTOR RESP ASPECT ITEM /METHOD = MINQUE (1) /DESIGN
2012 Mar 29
3
r-forge build failure bafflement
...a1[,"Imports"]] character(0) The perhaps-relevant parts of the DESCRIPTION file: ========= BuildVignettes: no Description: Fits mixed-effects models using a variety of distributions Imports: stats, nlme Depends: R (>= 2.13), methods, MASS, R2admb Suggests: lattice, lme4, lme4.0, coda, mlmRev, scapeMCMC, ggplot2, bbmle, pscl, knitr, car ===== The only other thing I can think of is backing up a few SVN revisions and seeing whether I can get back to a working version, but I'd like to see if I can get it fixed by moving forward rather than backward ... For anyone who is intrigue...
2006 Nov 27
1
Help with response CIs for lme
Hi, Can someone please offer a procedure for going from CIs produced by intervals.lme() to fixed-effects response CIs. Here's a simple example: library(mlmRev) library(nlme) hsb.lme <- lme(mAch ~ minrty * sector, random = ~ 1 | cses, Hsb82) (intervals(hsb.lme)) (hsb.new <- data.frame minrty = rep(c('No', 'Yes'), 2), sector = rep(c('Public', 'Catholic'), each = 2))) cbind(hsb.new, predict(hsb.lme, hsb.new, l...
2006 Oct 20
1
Translating lme code into lmer was: Mixed effect model in R
...are the same. fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy, method='ML') fm2 <- lme(Reaction ~ Days, random=~Days|Subject, sleepstudy, method='ML') Now, assume you want to extend this to include additional levels of random variation. The egsingle data set in the mlmRev package has repeated measures on students and those students are nested in schools. We can fit a model with random intercepts and slopes for students and students within schools. The first model is fit using lme and the second is fit using lmer. fm3 <- lme(math ~ year, random=~year|schoolid/chi...
2008 Jun 17
1
read.spss {foreign} doesn't work over network?
..."methods" "C:/PROGRA~1/R/R-27~1.0/library" "2.7.0" mgcv "mgcv" "C:/PROGRA~1/R/R-27~1.0/library" "1.4-0" mlbench "mlbench" "C:/PROGRA~1/R/R-27~1.0/library" "1.1-3" mlmRev "mlmRev" "C:/PROGRA~1/R/R-27~1.0/library" "0.995-1" modeltools "modeltools" "C:/PROGRA~1/R/R-27~1.0/library" "0.2-15" moonsun "moonsun" "C:/PROGRA~1/R/R-27~1.0/library" "0.1&quot...