Displaying 20 results from an estimated 2000 matches similar to: "for loop help"
2005 Feb 18
1
Two-factorial Huynh-Feldt-Test
Hi,
I'm currently working on porting some SAS scripts to R, and hence need
to do the same calculation (and get the same results) as SAS in order to
make the transition easier for users of the script.
In the script, I'm dealing with a two-factorial repeated-measures anova.
I'll try to give you a short overview of the setup:
- two between-cell factors: facBetweenROI (numbering
2006 May 11
1
model formulation for the following ANOVA
Hallo!
I have run a EEG experiment and got the following data
group: 1 2 1 2 1 2 1 2 ... as factor, 2 levels between subjects fixed effect (patient vs control)
subj: 1 2 ... 14 1 2 ... 14 as factor 7 patients 7 control random effect
condition: 1 1 ... 2 2 ... 1 1 ... 2 2 as factor, 2 levels within subjects, ie every subject worked on every cond fixed effect
roi: 1 ... 2 ... 3 ... 4 ... as factor,
2005 Mar 10
1
contrast matrix for aov
How do we specify a contrast interaction matrix for an ANOVA model?
We have a two-factor, repeated measures design, with
Cue Direction (2) x Brain Hemisphere(2)
Each of these has 2 levels, 'left' and 'right', so it's a simple 2x2 design
matrix. We have 8 subjects in each cell (a balanced design) and we want to
specify the interaction contrast so that:
CueLeft>CueRght
2005 Feb 22
3
Reproducing SAS GLM in R
Hi,
I'm still trying to figure out that GLM procedure in SAS.
Let's start with the simple example:
PROC GLM;
MODEL col1 col3 col5 col7 col9 col11 col13 col15 col17 col19 col21 col23
=/nouni;
repeated roi 6, ord 2/nom mean;
TITLE 'ABDERUS lat ACC 300-500';
That's the same setup that I had in my last email. I have three factors:
facSubj,facCond and facRoi. I had this pretty
2012 Jul 17
1
Need Help in a Combinatorial Optimzation Problem
Dear Community,
I have a problem I am trying to code in R.
Suppose there are 7 products and each have a ROI value attached to it.
There are 400 representatives who calls 150,000 customers with these
product detailing and achieve sales through the calls.
There is a cost per call and revenue earned from the call.
Constraint is revenue should be greater than the cost.
Now there can be at most 7
2009 Feb 11
1
Variables captured in closures get copied?
Hi list! I have a data frame called fix and a list of index vectors
called rois:
> head(rois, 3)
[[1]]
[1] 2 1
[[2]]
[1] 3
[[3]]
[1] 6 7 28 26 27 24 25
The part that's causing the issue is the following line:
lapply(rois, function(roi) fix$x[roi] <- 100)
So for every index vector I'd like to set the respective entries in the
data frame (fix) to 100.
I
2009 Dec 08
6
conditionally merging adjacent rows in a data frame
Hi, I have a data frame and want to merge adjacent rows if some condition is
met. There's an obvious solution using a loop but it is prohibitively slow
because my data frame is large. Is there an efficient canonical solution for
that?
> head(d)
rt dur tid mood roi x
55 5523 200 4 subj 9 5
56 5523 52 4 subj 7 31
57 5523 209 4 subj 4 9
58 5523 188 4 subj 4 7
2005 Jan 03
2
problem with default_mail_env
I'v set the default_mail_env to maildir:/var/maildir/%d/%u where
/var/maildir/ is the root dorectory for my maildir tree and I'm
getting the folowing error in the maillog :
Jan 3 15:16:58 websrv pop3(roi): unlink(/var/maildir//roi/cur/new:2,T) failed:
Is a directory
Notice that the %d is missing.
If I change to 'default_mail_env =
maildir:/var/maildir/example.tld/%u' then
2008 Sep 02
2
Help with nonlinear regressional
Dear All,
I am doing experiments in live plant tissue using a laser confocal
microscope. The method is called "fluorescence recovery after
photo-bleaching" (FRAP) and here follows a short summary:
1. Record/ measure fluorescence intensity in a defined, round region of
interest (ROI, in this case a small spot) to determine the initial intensity
value before the bleaching. This
2009 Nov 25
2
order of panels in xyplots
I'd like do a simple xyplot with customized order of panels and try to
understand how to use index.cond for that. Several attempts didn't
deliver the correct results. Now, I noticed the following:
> p <- xyplot(dur~roi|trial, data)
> p$index.cond
[[1]]
[1] 1 2 3 4 5 6 7 8 9 10
These numbers are "valid indexing vector for the integer vector
2005 Jun 22
3
How to I change server=[Samba 3.04.14a-2] to something else?
So I have setup my samba box as a PDC and everything is working fine.
There is one thing that keeps bugging me:
When I run locallly: smbclient -L localhost -U%
I get the following:
-----------------------------
Domain=[MYDOMAIN] OS=[Unix] Server=[Samba 3.0.14a-2]
Sharename Type Comment
--------- ---- -------
IPC$ IPC IPC Service
2007 Jun 07
1
Scale Binding
Hi,
Recently this commit was pushed to git, changing the default binding
for scale to alt + shift + up:
http://gitweb.freedesktop.org/?p=xorg/app/compiz.git;a=commit;h=77def1253419e1e0d3335f4c4790471b5130f087
I think this new binding is quite bad for many users who have multiple
layouts in their keyboard (like non-latin languages), as alt + shift
is commonly used for changing keyboard layouts.
2005 Mar 07
2
Question about AGI vs. FastAGI vs. straight C/DB development
Folks,
I want to build a custom IVR for my setup. I've got it
working (well, the bells and whistles are not there
yet, but the basic stuff works) using AGI, but I'm
worried about how well this will scale.
I've seen references to FastAGI, and presumably this
will be more efficient.
Question, though: how well do either of these (AGI or
FastAGI) scale if my system is handling a large
2005 Feb 23
1
H-F corr.: covariance matrix for interaction effect
Hi,
I'm still not quite there with my H-F (G-G) correction code. I have it
working for the main effects, but I just can't figure out how to do it
for the effect interactions. The thing I really don't know (and can't
find anything about) is how to calculate the covariance matrix for the
interaction between the two (or even n) main factors.
I've looked through some books
2005 Feb 23
1
H-F corr.: covariance matrix for interaction effect
Hi,
I'm still not quite there with my H-F (G-G) correction code. I have it
working for the main effects, but I just can't figure out how to do it
for the effect interactions. The thing I really don't know (and can't
find anything about) is how to calculate the covariance matrix for the
interaction between the two (or even n) main factors.
I've looked through some books
2010 Jun 16
2
qplot
Hello,
I am a new r-user, and after a great effort I have made this fantastic
figure with qplot:
qplot(ROI, CBF, fill=factor(Carrier), data=combinedboxplot_dataset_se_1_CBF,
geom="boxplot", position="dodge",xlab=NULL,ylab=("CBF,white
matter-normalized"),main=("Differences between carriers and non-carriers on
baseline"))+theme_bw()
Can anyone help me
2007 Apr 25
1
barchart producing incorrect number of barcharts when columns renamed
Hi everybody,
I'm having problems with the barchart command in the lattice package.
I'm creating barcharts from matrices with with anything from 20 to 71
columns. When I leave the column names alone, that is they are set in
the read.table command (and inherited by subsequent commands) the
correct number barcharts is created by the "print(barchart(...))"
command.
2006 Mar 28
1
variables as arguments in formulae in aov?
Hi all,
I wonder if you could help me with (what is surely) a simple R question?
I've written a simple R script (attached) to perform multiple ANOVAs
on the columns in a table loaded in from a a file (also attached). I
loop through the list of columns for which I want to perform the
ANOVAs, storing the column name in a variable. When I try to perform
the ANOVA using the variable name as a
2009 Jan 10
0
RMySQL CREATE TABLE error
Hi all-
I am stumped. The code in A. returns errors at lines 14 and 15 and fails
to load series1 and series2. However, in B., if temp1 and temp2 are
called again (which returns a "Table exists" error; see lines 14-17 in
B.) series1 and series2 load correctly. Any ideas? Also-I am open to any
suggestions to improve the code as I am a horrific programmer. Thanks
A.
1 >
2007 Apr 26
1
[PATCH]Make wobbly's bezier patch to work with grids that aren't 4x4.
Hi,
Recently, I started taking a look at wobbly's source (I was interested
in it's physics... ;-))
I noticed that GRID_WIDTH and GRID_HEIGHT were defined to be 4, and I
wanted to see how the physics look like with grid sizes that aren't
4x4.
I changed the defines to my new grid size, but unfortunately it didn't work.
I investigated this "bug" (it's not exactly a bug