similar to: Plotting interactions from lme with ggplot

Displaying 20 results from an estimated 9000 matches similar to: "Plotting interactions from lme with ggplot"

2012 Sep 26
1
Interaction scatterplots in ggplot with multiple regression lines
I'm trying to treat a continuous variable as discrete for plotting multiple regression lines in a scatterplot as a function of the level on the moderating variable. In the example below, there is only one regression line plotted to the whole data. I would like a separate regression line for each discrete level of the moderator. The moderator is continuous, so I'd like to treat it as
2011 Feb 20
1
Plotting individual trajectories from individual growth model
Hi all, I am trying to plot the fitted trajectories for each individual from an individual growth model (fit with a linear mixed effects model in lme). How can I plot each person's trajectory in the *same* panel, along with the mean-level trajectory? Below is an image of a plot similar to what I'm trying to create (from: http://jpepsy.oxfordjournals.org/content/31/10/1002/F6.large.jpg):
2006 Oct 22
1
Multilevel model ("lme") question
Dear list, I'm trying to fit a multilevel (mixed-effects) model using the lme function (package nlme) in R 2.4.0. As a mixed-effects newbie I'm neither sure about the modeling nor the correct R syntax. My data is structured as follows: For each subject, a quantity Y is measured at a number (>= 2) of time points. Moreover, at time point 0 ("baseline"), a quantity X is
2009 Nov 02
2
convert list to numeric
I would like to preface this by saying that I am new to R, so I would ask that you be patient and thorough, so that I'm not completely clueless. I am trying to convert a list to numeric so that I can perform computations on it (specifically mean-center the variable), but I am running into problems. I have imported the data set into "task" (data frame). The data frame is made of
2011 Sep 03
2
Change properties of line summary in interaction.plot
Is it possible to change the color/thickness of the summary line in an interaction.plot without changing the other individual data lines? I would like to make the line from the summary function (mean) the color red and thicker than the surrounding black lines. How can I do that? Here is a link to interaction.plot: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/interaction.plot.html
2010 Nov 01
3
Mean and individual growth curve trajectories
I'm trying to understand how to plot individual growth curve trajectories, with the overall mean trajectory superimposed (preferably in a slightly thicker line, maybe in black) over the individual trajectories. Using the sleepstudy data in lme4, here is the code I have so far: library(lme4) library(lattice) xyplot(Reaction ~ Days, data = sleepstudy, group = Subject, type = 'l')
2012 Jun 28
1
Simple mean trajectory (ordinal variable)
Hello. I have 5 measurement points, my dependent variable is ordinal (0 - 3), and I want to visualize my data. I'm pretty new to R. What I want is to find out whether people with different baseline covariates have different trajectories, so I want a plot with the means trajectory of my dependent variable (the individual points do not make a lot of sense in ordinal data) on each measurement
2007 Apr 09
1
testing differences between slope differences with lme
hello i have a mixed effect model which gives slope and intercept terms for 6 groups (diagnosis (3 levels) by risk group(2 levels)). the fixed part of the model is -- brain volume ~ Diagnosis + Risk Group + (Risk Group * age : Diagnosis) - 1 thus allowing risk group age/slope terms to vary within diagnosis and omitting a nonsignificant diagnosis by risk group intercept (age was centered)
2010 Dec 16
1
xyplot
Hi   I am using following code to produce a xyplot for some longitudinal data. There are 2 panels. It produced all longitudinal trajectories with mean profile. But since the dataset it very large plot looks very messy. I want to show, say 10 randomly selected individual longitudinal trajectories together with mean profile for entire dataset. Could any help me to alter the following code to do
2007 Jan 26
1
bootstrap bca confidence intervals for large number of statistics in one model; library("boot")
Sometimes one might like to obtain pointwise bootstrap bias-corrected, accelerated (BCA) confidence intervals for a large number of statistics computed from a single dataset. For instance, one might like to get (so as to plot graphically) bootstrap confidence bands for the fitted values in a regression model. (Example: Chiu S et al., Early Acceleration of Head Circumference in Children with
2017 Aug 18
2
R Issues with packages
so I am trying to get my R setup to run this users package. Any help would be great THANKS devtools::install_github(repo = "dadrivr/ffanalytics") I get this devtools::install_github(repo = "dadrivr/ffanalytics") Downloading GitHub repo dadrivr/ffanalytics at master from URL https://api.github.com/repos/dadrivr/ffanalytics/zipball/master Installing ffanalytics
2003 Oct 06
2
Selecting a random sample for lmList()
Dear List: I have a data set with over 7000 students with about 4 observations over time per student. I want to examine the within-group fits of a random sample of this group as it takes forever to compute and draw all 7000 regressions. Here is the code I have used so far. >group<-groupedData(math~year|childid, data=scores) >group.list<-lmList(group)
2010 Mar 06
2
Plot interaction in multilevel model
I am trying to plot an interaction in a multilevel model. Here is some sample data. In the following example, it is longitudinal (i.e., repeated measures), so the outcome, score (at each of the three time points), is nested within the individual. I am interested in the interaction between gender and happiness predicting score. id <- c(1,1,1,2,2,2,3,3,3) age <-
2017 Aug 18
0
R Issues with packages
You just need to READ the error messages and use Google. Don't try to install tcltk. The other two packages are not available through CRAN... they are Bioconductor packages. (Not supported here... use Google.) And learn to post plain text in the future to avoid scrambling what you thought you sent before we see it. Read the Posting Guide. -- Sent from my phone. Please excuse my brevity.
2007 Nov 13
1
ggplot2: changing axis labels in ggplot()
Hi all, For various reasons, I need to use ggplot instead of qplot for a complex figure. Everything is working fine, except I cannot figure out how to rename the axis labels in ggplot. I have pasted a simple example below. Any ideas on what I am doing wrong? Thanks for your help. James library(ggplot2) ##create data
2017 Aug 18
1
R Issues with packages
Thanks Jeff I got the Bioconductor packages installed and tried googling the 65535 tried some things and still get the same error. On Fri, Aug 18, 2017 at 10:59 AM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote: > You just need to READ the error messages and use Google. > > Don't try to install tcltk. > > The other two packages are not available through CRAN...
2007 Oct 01
1
Adding circles or ellipses to graphs
Hello, I'm developing an ordination using metaMDS (package vegan). The analysis identifies 3 distinct groups that I'd like to define by either adding circles or ellipses to help identify the groups. The data set is a spatial temporal data base depicting change in each of 4 areas over 3 time periods. I can add lines that would link each of the time - x - area trajectories, but
2010 Sep 15
3
Creating publication-quality plots for use in Microsoft Word
Hi everyone, I am trying to make some publication-quality plots for use in Microsoft Word, but I am having trouble creating high-quality plots that are supported by Microsoft Word. If I use the R plot function to create the figure, the lines are jagged, and the picture is not of high quality (same with JPEG(), TIFF(), and PNG() functions). I have tried using the Cairo package, but it distorts
2005 Aug 04
1
Counterintuitive Simulation Results
I wonder if someone can help me understand some counterintuitive simulation results. Below please find 12 lines of R code that theoretically, to the best of my understanding, should produce essentially a flat line with no discernable pattern. Instead, I see an initial dramatic drop followed by a slow rise to an asymptote. The simulation computes the mean of 20,000 simulated trajectories
2009 Dec 13
2
Reshape a data set
I am trying to reshape a data set. Could someone please help me with the reshape, cast, and melt functions? I am new to R and I have tried reading up on how to use the reshape package, but I am very confused. Here is an example of what I am trying to do: subject coder score time [1,] 1 1 20 5 [2,] 1 2 30 4 [3,] 2 3 10 10 [4,] 2 2