Displaying 13 results from an estimated 13 matches for "nsubj".
Did you mean:
subj
2002 May 27
1
nlme cross-over and fixed nested
...dmit that nesting is nowhere
indicated.
I know how to handle the case is Seq if assumed a random effect, but I don't
see why it should be random, AND I want an estimate of the effect.
So, if the question is stupid, please help me out at least an tell my WHY.
# cross-over design
library(nlme)
NSubj<-20
# Placebo Phase
# Seq: 1 for "Placebo first phase", 2 for "Verum first phase"
glup<-data.frame(Patient=as.factor(1:NSubj),
Seq=as.factor(rep(c(1,2),NSubj/2)),
Treat=rep("Pla",NSubj),
Glu=rnorm(NSubj,30,4)
)
#...
2003 Nov 16
1
SE of ANOVA (aov) with repeated measures and a bewtween-subject factor
Hallo!
I have data of the following design:
NSubj were measured at Baseline (visit 1) and at 3
following time points (visit 2, visit 3, visit 4).
There is or is not a treatment.
Most interesting is the question if there is a
difference in treatment between the results of visit 4
and baseline. (The other time points are also of
interest.) The leve...
2006 Jan 17
2
lme model specification
I have been asked to analyse the results of (what is to me) a very
complicated experiment.
The dependent measure is the estimated distance, which is measured as a
function of the actual distance. There are also several other IVs.
The plot of log estimated distance as a function of log distance is
linear. So in the rest of the analysis I will use logestimate and
logdistance.
My plan is to see
2007 Jun 21
1
Result depends on order of factors in unbalanced designs (lme, anova)?
...but in an unbalanced design there are differences depending on fitting y~visit*treat*gender or y~gender*visit*treat - at least with anova (see example). Does this make sense? Which ordering might be the correct one?
Here the example script:
library(nlme)
set.seed(123)
# Random generation of data:
NSubj<-40 # No. of subjects
set.seed(1234)
id<-factor(rep(c(1:NSubj),4)) # ID of subjects
treat<-factor(rep(rep(1:4,each=5),4)) # Treatment 4 Levels
gender<-factor(rep(rep(1:2, each=20),4))
visit<-factor(rep(1:4, each=NSubj))
y<-runif(4*NSubj) # Results
# Add effects
y<-y+0.01*as.int...
2010 Dec 19
3
Layout of mulitpage conditioned lattice plots
...read a lattice conditioned plot over multiple pages,
keeping the same layout as if I had only one page as shown in the code
below.
My workaround is to divide the dataframe into subset that fit on one page,
but the code is ugly.
Is there a build-in way to achieve this?
Dieter
library(lattice)
nsubj = 13 # This number is variable
dt = expand.grid(time=1:20,comp=LETTERS[1:3],subj=letters[1:nsubj])
dt$val = rnorm(nrow(dt))
#pdf(file="multpageOk.pdf")
# How it should look:
xyplot(val~time|subj+comp, data=dt,type="l",layout=c(10,3),
subset=as.integer(subj) <= 10)
#dev.off...
2007 Nov 01
2
Some problem in opening connection with" .dat" extention file in matrix(scan) function of R 2.5
...my problem while I m
trying to run a program .I m attaching both the program and the data to
which I have to obtain my estimation results.
"Motives.dat" is the data file, and "OBTfile4.3" is the complete code of
program. by Running this
//
rawdata<-matrix(scan(inputFile, n = nsubj*ncomp), nsubj, ncomp, byrow = TRUE)
\\
The error appears to be
//
Error in file(file, "r") : unable to open connection
In addition: Warning message:
cannot open file 'motives_pc.dat', reason 'No such file or directory' in:
file(file, "r")
\\
where # name of pref...
2003 Mar 11
0
Interrater and intrarater reliability
...ction.
Tore Wentzel-Larsen
statistician
Centre for Clinical Research
Haukeland University Hospital
N-5021 Bergen, Norway
email: tore.wentzel-larsen at helse-bergen.no
the function:
---------------------------------------------------------------------------------
relInterIntra<-function(Results,nsubj=40,nrater=3,nmeas=2,raterLabels=c('a','b','c'),rho0inter=0.6,rho0intra=.8,conf.level=.95)
{
# gives the reliability coefficients in the article by Eliasziw et. al. 1994; Phys. Therapy 74.8; 777-788.
# all references in this function are to this article.
# input: Results, dat...
2002 Oct 08
3
repeated measures help; disagreement with SPSS
...t from SPSS.
the design is 1 repeated measure (session) and 1 between measure
(cond). my dependent measure is rl. here is the data I'm using (in a
data.frame):
mig <- data.frame(subj=factor(rep(subj,3)),
cond=factor(rep(cond,3)),
session=factor(c(rep(1,nsubj),rep(2,nsubj),rep(3,nsubj))),
rl)
> mig
subj cond session rl
1 401.1 NW 1 6.4081
2 402.1 NW 1 5.8861
3 500.1 NWC 1 5.3492
4 502.1 NWC 1 8.5302
5 601.1 NWR 1 2.7519
6 602.1 NWR 1 4.5404
7 603.1 NWR 1 4.344...
2010 Mar 15
3
Frequencies from a matrix - spider from frequencies
First of all, I really like R! Still being a newbie, I find things (the
difficult ones) to be very simple.
Alas, some 'simple' things still escape me. (Maybe the tutorials are
often too much focused on the 'difficult' items??)
Here comes my 'problem', over which I have sweated for the last 2 hours:
My data are of a matrix 10x31, Likert Scale (1-5). 10 questions, 31
2006 Jan 06
2
panel data unit root tests
When finally got some time to do some coding, I started and stopped right
after. The stationary test is a good starting point because it demonstrates
how we should be able to move the very basic R matrices. I have a real-
world small N data set with
rows:
id(n=1)---t1---variable1
...
id=(N=20)---T=21---variable1
Thus, a good test case. For first id I was considering something like this:
lag
2010 Dec 19
3
monthly median in a daily dataset
Hello,
I have a multi-year dataset (see below) with date, a data value and a flag
for the data value. I want to find the monthly median for each month in this
dataset and then plot it. If anyone has suggestions they would be greatly
apperciated. It should be noted that there are some dates with no values and
they should be removed.
Thanks
Emily
> print ( str(data$flow$daily) )
2007 Jun 24
2
matlab/gauss code in R
...g on fitting y~visit*treat*gender or y~gender*visit*treat - at least with anova (see example). Does this make sense? Which ordering might be the correct one?
> >
> > Here the example script:
> > library(nlme)
> > set.seed(123)
> > # Random generation of data:
> > NSubj<-40 # No. of subjects
> > set.seed(1234)
> > id<-factor(rep(c(1:NSubj),4)) # ID of subjects
> > treat<-factor(rep(rep(1:4,each=5),4)) # Treatment 4 Levels
> > gender<-factor(rep(rep(1:2, each=20),4))
> > visit<-factor(rep(1:4, each=NSubj))
> > y<...
2009 Jun 01
1
installing sn package
...intervals
> reported
> # for the reliability coefficients
> # output reformatted as an "irrlist" stucture - Jim Lemon 2009-05-27
>
> relInterIntra<-function(x,nrater=1,raterLabels=NULL,
> rho0inter=0.6,rho0intra=0.8,conf.level=.95) {
>
> xdim<-dim(x)
> nsubj<-xdim[1]
> nmeas<-xdim[2]/nrater
> if(is.null(raterLabels)) raterLabels<-letters[1:nrater]
> Frame1<-data.frame(cbind(rep(1:nsubj,nrater*nmeas),
> rep(1:nrater,rep(nsubj*nmeas,nrater)),
> rep(rep(1:nmeas,rep(nsubj,nmeas)),nrater),
> matrix(as.matrix(x),ncol=1)))...