similar to: Covariance/Correlation matrix for repeated measures data frame

Displaying 20 results from an estimated 3000 matches similar to: "Covariance/Correlation matrix for repeated measures data frame"

2005 Oct 03
2
"symbol print-name too long"
All, I've coded a function and it works manually if I copy it line by line into R. However, when I try to "load" (copy and paste) the entire function into R, I get the following error after the listed line of code: + N.j.list = lapply(rej.hyp, length) Error: symbol print-name too long Does anyone you know what this error means? Strangely, when I copy the same line verbatim
2006 Sep 07
5
augPred plot in nlme library
All, I'm trying to create an augPred plot in the nlme library, similar to the plot on p.43 of Pinheiro & Bates (Mixed Effects Models in S and S-Plus) for their Pixel data. My data structure is the same as the example but I still get the error msg below. > comp.adj.UKV <- groupedData(adj.UKV ~ Time | Patient_no/Lisinopril, data = comp.adj.UKV.frm, order.groups = F) >
2003 Aug 13
1
means comparison with seasonal time series?
Dear R list, I have a sequence of weekly observations of number of adults and larvae in various size classes from a butterfly population living in a subtropical area with pronounced wet and dry seasons. Wet and dry seasons are each defined 26 weeks long with fixed start and end dates. The data span 103 weeks (two seasons each of wet and dry) with some missing weeks. What I would like to do is
2003 Sep 08
1
1.7.1 console unresponsive following "paste into"
Dear R Help, I've just installed 1.7.1 and have found that the console now exhibits odd behavior when I paste commands into it. I'm on a PC running Windows XP Professional. I use Word as my script editor, and then paste commands into the R console using the standard Windows "copy" within Word then "paste" within Rgui. This worked without a hitch in 1.7.0, but now in
2007 Nov 13
2
group mean, minus each row's value
I used the following to assign each row the group average, where w is the new group average variable, x is the variabale to be averaged, and g is the nominal group indicator: w <- ave(x,g) Now I want to calculate the group average, but WITHOUT each row's value of x. Is there an easy way to do this? I'm sure I'm missing something obvious here, but for the life of me I can't
2007 Nov 12
4
how to assign a group mean to individual cases?
I need advice on how to create a variable that is the group mean of another variable. For example, I have a variable called x for which each row in the data set has a value. I also have a nominal variable called g that indicates which of 100 different groups each row belongs to. So, I want to create a new variable called w, which is the group mean of x for which ever group the row belongs to (as
2009 Sep 14
2
how to recode with an if-type statement
I'm sure this is easy, but I'm having a hard time figuring out how to recode some data in R. I have a variable "numpeers" which is valued 1, 2, or 3. I also have three other variables called "w9zd9_1," "w9zd9_2," and "w9zd9_3." I want to use these variables to create a new item called "distot." Specifically, here is what I want to do:
2005 Mar 17
2
Repeated Measures, groupedData and lme
Hello I am trying to fit a REML to some soil mineral data which has been collected over the time period 1999 - 2004. I want to know if the 19 different treatments imposed, differ in terms of their soil mineral content. A tree model of the data has shown differences between the treatments can be attributed to the Magnesium, Potassium and organic matter content of the soil, with Magnesium being the
2006 Jun 28
5
sapply question
sent this to the list yesterday but didn't see it listed in the daily summary ... apologies if you receive it twice ... ________________________________ From: Afshartous, David Sent: Tuesday, June 27, 2006 10:02 AM To: 'r-help@stat.math.ethz.ch' Subject: sapply question All: I'm trying to use sapply to break up data within another function. (tapply doens't seem to work
2010 Jun 02
2
pdf function, resize xyplot plot automatically
All, When saving plots to a pdf file via the pdf function, I would like to be able to automatically expand the graphics device to achieve the same result as when one does this manually (e.g., clicking the green expand button on the upper left of the graph on Mac OS). Consider simple example below: library("lattice") foo.frm = data.frame(Subject = rep(c(1:4), each = 9), Y =
2009 Jul 24
1
Aggregate, max and time of max
All, For data consisting of serial measurements on subjects, one may use the aggregate function to say compute the peak response for each subject for each design condition. Is there a way to alter this or another one-liner to also retain the time at which the peak occurred and thus avoid writing a doing this via a loop? I suppose one could attempt to employ the split function but that's
2006 Sep 12
11
levels of factor when subsetting the factor
All, When I take a subset of a factor the reduced factor still maintains all the original levels of the factor when say forming the key in a plot. The data is correct, but the variable still "remembers" the original levels. See below for reproducible code. Does anyone know how to fix this? cheers, dave fact = as.factor(c(rep("A", 3),rep("B", 3), rep("C",
2006 Sep 23
4
plotting grouped data object
All, I'd like to plot the main relationship of a grouped data object for all levels of a factor in a single panel. The sample code below creates a separate panel for each level of the factor. I realize that this could be done in other ways, but I'd like to do it via plotting the grouped data object. thanks! dave z = rnorm(18, mean=0, sd=1) x = rep(1:6, 3) y =
2008 Jan 15
1
Converting Watir script to Mechanize
I have a Watir script that I would like to convert to a Mechanize script. The watir code looks like this require ''watir'' include Watir def test ie = IE.new ie.goto(''http://cpref.gsm.com/inter.asp?r=8084'') ie.text_field(:name, ''inter_string'').set(''Potassium'') ie.button(:id, ''image1'').click
2008 Sep 30
1
Using sub to get captions in barplots
All, I've been using "sub" (subtitle) instead of "main" such that captions are below figures produced by xyplot. This works fine and captions are on a single line. However, when I try this for bar plots with error bars (altering the error.bars function form Crawley's The R Book, see below), the captions are split on more than 1 line. Is there a way to get the
2003 Aug 23
1
filling a matrix who's entries are a function of the indices?
Dear R list, What's the best way in R to fill a matrix who's entries depend on some function of the indices? I'm currently doing: Q <- matrix(0, k, k) for (A in 1:k) { for (B in 1:k) { Q[A,B] <- my.function(A,B) } } but I wonder if there is a more terse way. Regards, Douglas Scofield Department of Biology d.scofield at
2006 Jun 27
2
supplying dynamic main argument to plot?
All, Simple question but I don't seem to be able to find the answer in the documentation: When using "plot" within a loop, is there any way to supply the argument to "main" dynamically, i.e., so that the title is Patient k below as the loop cycles through each value of k? plot(x,y, xlim=c(0,250), ylim=c(0,1000), xlab="gamma", ylab="r1",
2007 Jul 05
3
summarizing dataframe at variable/factor levels
All, Is there an efficient way to apply say "mean" or "median" to a dataframe according to say all combinations of two variables in the dataframe? Below is a simple example and the outline of a "manual" solution that will work but is not very efficient (could also generalize this to a function). Searched the archives and docs but didn't see anything close to
2005 Aug 20
2
diagonal matrices
Hello all, I have matrices V.i of dimension n.i x n.i, where i = 1, ..., J, and the sum of n.i equals N. (and n.i ! = n.j) goal: create one large matrix V, where V has matrices V.i on diagonal. I create each matrix V.i in a for loop (1 to J), so each time I'd like to augment V with the most recently calculated V.i, such that I'll have V after the final iteration of the for loop.
2009 Nov 05
0
Biometric Summit - Feb. 22-25, 2010
Join your colleagues for the 20th highly acclaimed international forum to hear the latest implementations of biometrics... The Winter 2010 BIOMETRICS SUMMIT: -------------------- Practical Implementation Strategies, Market Trends And Best Practices In Government And Business -------------------- February 22-25, 2010 - Miami, FL