search for: facroi

Displaying 3 results from an estimated 3 matches for "facroi".

2005 Feb 22
3
Reproducing SAS GLM in R
...;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 much figured out with three lengthy calls to lm(), but I have to extend my code to also work on models with four, five or even six factors, so that doesn't seem like a practical method any more. I've tried with the following code with glm(),anova() and drop1() (I use...
2005 Feb 23
1
H-F corr.: covariance matrix for interaction effect
...<- (k^2 * (mean(S) - mean(diag(S)))^2) N1 <- sum(S^2) N2 <- 2 * k * sum(apply(S, 1, mean)^2) N3 <- k^2 * mean(S)^2 epsiGG <- D / ((k - 1) * (N1 - N2 + N3)) epsiHF <- (n * (k-1) * epsiGG - 2) / ((k-1) * ((n-1) - (k-1)*epsiGG)) c(epsiGG,epsiHF) } # three factors, facROI,facCond,facSubj # facROI,facCond are main effects, facSubj is "repeatedness" # G-G and H-F corrections for a main effect # we do the gghf stuff for the ROI, which means ROIs in columns, # subjects in rows mtx <- NULL for (iROI in 1:length(unique( facROI ))) { for (iSubj in 1:length(...
2005 Feb 23
1
H-F corr.: covariance matrix for interaction effect
...<- (k^2 * (mean(S) - mean(diag(S)))^2) N1 <- sum(S^2) N2 <- 2 * k * sum(apply(S, 1, mean)^2) N3 <- k^2 * mean(S)^2 epsiGG <- D / ((k - 1) * (N1 - N2 + N3)) epsiHF <- (n * (k-1) * epsiGG - 2) / ((k-1) * ((n-1) - (k-1)*epsiGG)) c(epsiGG,epsiHF) } # three factors, facROI,facCond,facSubj # facROI,facCond are main effects, facSubj is "repeatedness" # G-G and H-F corrections for a main effect # we do the gghf stuff for the ROI, which means ROIs in columns, # subjects in rows mtx <- NULL for (iROI in 1:length(unique( facROI ))) { for (iSubj in 1:length(...