Displaying 20 results from an estimated 10000 matches similar to: "repeated measures regression and power analysis?"
2010 Jul 05
2
repeated measures with missing data
Dear R help group, I am teaching myself linear mixed models with missing data since I would like to analyze a stats design with these kind of models. The textbook example is for the procedure "proc MIXED" in SAS, but I would like to know if there is an equivalent in R. This example only includes two time-measurements across subjects (a t-test "with missing values"), but I
2009 Nov 08
2
linear trend line and a quadratic trend line.
Dear list users
How is it possible to visualise both a linear trend line and a quadratic trend line on a plot
of two variables?
Here my almost working exsample.
data(Duncan)
attach(Duncan)
plot(prestige ~ income)
abline(lm(prestige ~ income), col=2, lwd=2)
Now I would like to add yet another trend line, but this time a quadratic one. So I have two
trend lines. One linear trend line
2009 Dec 18
1
linear contrasts for trends in an anova
Hi everybody,
I'm trying to construct contrasts for an ANOVA to determine if there is a significant trend in the means of my groups.
In the following example, based on the type of 2x3 ANOVA I'm trying to perform, does the linear polynomial contrast generated by contr.poly allow me to test for a linear trend across groups?
doi=data.frame(
Group=c(
rep(1, 5), rep(2, 5), rep(3, 5),
2009 May 18
2
Overdispersion using repeated measures lmer
Dear All
I am trying to do a repeated measures analysis using lmer and have a number
of issues. I have non-orthogonal, unbalanced data. Count data was obtained
over 10 months for three treatments, which were arranged into 6 blocks.
Treatment is not nested in Block but crossed, as I originally designed an
orthogonal, balanced experiment but subsequently lost a treatment from 2
blocks. My
2009 Mar 24
1
Variogram with Gstat
Dear all can you help me? i have this problem: i have a dataset in a text file
in a matrix of 3 columns: x, y, z where x and y are the coordinates and Z are
the mesurements. How can i do a variogram with R?
2009 Aug 20
1
nested, repeated measure lme
Dear all,
Suppose I have a nested, repeated measure lme model. Which of the following formulae is correct?
(assuming data are sampled from several plots in an agricultural experiment)
(1) y~explanatory.variables,random=~time|block/plot/subplot/individual
(2) y~explanatory.variables,random=~time|unique.ID.of.every.individual
I have read that (2) is the only approach that works. But how could I
2009 Sep 04
2
plot positive predictive values
Hi,
I'm trying to fit a smooth line in a plot(y ~ x) graph.
x is continuous variable
y is a proportion of success in sub-samples, 0 <= y <= 1, from a Monte
Carlo simulation.
For each x there may be several y-values from different runs. Each run
produces several sub-samples, where "0" mean no success in any sub-
sample, "0.5" means success in half of the
2009 Jun 10
2
plot two variograms on a same graph
Hi,
I would know how to plot two variograms on a same graph. I can plot one by one but I would draw both on the same one.
Is it possible? Do i need any special package?
Thanks!
Cordialement
Damien Landais
2012 May 10
2
Outcome~predictor model evaluation, repeated measurements
Dear all,
I have simple question regarding how to fit a model (i.e. linear) to the
data.
Say I have 10 subjects with different phenotypes (dependent var Y,
identical for a particular subject) and one predictor variable measured 3
times for each subject (X). By other words:
Y Subj X
1 1 1.2
1 1 1.3
1 1 0.7
3 2 2.1
3 2 2.5
3 2 4
5 3 3
5 3 4
5 3 4
...
20 10 12
20 10 13
20 10 12.5
Subj is a
2010 Feb 23
1
Longitudinal analysis: contrasting time points
Hi everyone
I have the following situation:
In a longitudinal study, subjects fill out a questionnaire every year
(repeated measurements over time). Also, the subjects are nested within
departments. There is an intervention going on over time. The outcome
variable is continuous. Now I'd like to analyse two things:
1. Is there a significant change over time? I think this is done by a
2009 Jul 28
1
Fwd: randomized block design analysis in R
---------- Forwarded message ----------
From: alis villiyam <aalisiyan at gmail.com>
Date: Mon, Jul 27, 2009 at 9:47 AM
Subject: randomized block design analysis in R
To: bolker at zoology.ufl.edu
Dear All user
Hello,
I'm a student and I have some trouble with the experimental
(columns-experiments) design of my project. I use a randomized block design
with 4 treatments including a
2013 Jan 28
1
incorrect import?
Dear all,
I'm not getting what I'm doing wrong. The line below from my read.fsa.bin function throws an error when just loading my AFLP package and disappears when I load the zoo package as well.
#the line that throws the error
Index <- which(Peak == rollmax(Peak, k = 1 + 2 * floor((min(diff(SizeStandard)) * Fs - 1) / 2), fill = -Inf))
#the error
Error in UseMethod("rollmax")
2009 Aug 13
4
un run run...
Hi All,
I am running an Rscript with a bunch of algorithms that are UNSTABLE
under some parameter settings.
At a certain point one of them sends error massage and my whole run STOPS!
What I would like is to save the error massage in some file or variable and
carry on to the next command line without stopping this run...
Any help or ideas would be welcome, please, with a concrete example
(not
2012 Nov 05
2
averaging a list of matrices element wise
Dear all,
I have a list of n matrices which all have the same dimension (r x s). What would be a fast/elegant way to calculate the element wise average? So result[1, 1] <- mean(c(raw[[1]][1, 1] , raw[[2]][1, 1], raw[[...]][1, 1], raw[[n]][1, 1]))
Here is my attempt.
#create a dummy dataset
n <- 3
r <- 5
s <- 6
raw <- lapply(seq_len(n), function(i){
matrix(rnorm(r * s), ncol =
2009 Sep 25
3
Problem on plotting TS using GGPLOT
Hi, I have following codes :
library(zoo); library(ggplot2); library(plyr)
dat <- rnorm(306); vv <- letters[1:6]; dat1 <- data.frame(dat, vv)
dat2 = zooreg(rnorm(51), as.yearmon(as.Date("2000-01-01")), frequency=12)
ggplot(dat1) +
geom_line(aes(y=dat, x=index(dat2), colour=vv), group=vv, size =
1.3)
However I got error while plotting them :
2009 Mar 11
3
Mixed models fixed effects
Dear All,
This may sound like a dumb question but I am trying to use a mixed model to
determine the predictors of bat activity along hedges within 8 sites. So my
response is continuous (bat passes) my predictors fixed effects are
continuous (height metres), width (metres) etc and the random effect is
site - can you tell me if the fixed effects can be continuous as all the
examples I have
2009 Dec 22
2
Nested For loops
Dear R experts,
Might be very simple question to ask but would be insightful. As the same story of nested "for loops". following is the code that I am using to get the autocorrelation function of the sample data. I have tried to get rid of for loops but since I am touching R after such a long time that I need to practice more but I need help to revive my skills. I know that apply() or
2009 Jul 07
6
Uncorrelated random vectors
Hello,
is it possible to create two uncorrelated random vectors for a given distribution.
In fact, I would like to have something like the function "rnorm" or "rlogis" with the extra property that they are uncorrelated.
Thanks for your help,
Luba
[[alternative HTML version deleted]]
2009 Apr 17
2
Generate bivariate binomial data
Dear all,
Could someone point me to a function or algorithm to generate random
bivariate binomial data?
Some details about what I'm trying to do. I have a dataset of trees who
were categorised as not damaged or damaged. Each tree is measured twice
(once in two consecutive years). The trees can recover from the damage
but the data is clearly correlated. As a (un)damaged tree is more likely
2009 Feb 11
2
Label bars in a faceted bar plot in ggplot2
Hi List,
I am running R 2.8.0 on a Windows XP machine, running ggplot2 version 0.8.1
I want to label the bars in a faceted grid barplot. Reproducible R
code is given below:
#### reproducible facet barplot #####
library(ggplot2)
# Dataset from which to create the barplot
ml <- rep(1:10,2)
vals <- rnorm(20,mean = 10, sd=1)
type <- c(rep("MAPE",10),rep("AIC",10))