Print

Print


If you are comfortable with R, try building your model there and then
asking for the model.matrix, i.e.

mod=lm(Y~FacA+FacB+Cov+Cov*FacA)  # whatever
X=model.matrix(mod);
write.table(X,'X.dat')


Note that R uses "treatment contrasts" to create the dummy variables for
categorical (factor) effects; this means that the first level of the factor
is the reference and coded with all zeros, which means the intercept will
then be interpreted as the fit of that first factor level.  Alternatively,
you can get 'sum to zero' contrasts (where the first factor level is coded
with -1's) by running this before you call lm

options(contrasts=c("contr.sum", "contr.helmert"))


And if you have a simple model and can afford to have K regressors for a
K-level factor variable, you can use simple 1/0 dummy variables.  Ask lm to
do this by dropping the intercept with this the -1 syntax:

mod=lm(Y~-1+FacA)


This only works for the first factor variable in the model, though.

-Tom

On Fri, Dec 9, 2011 at 2:39 PM, Stephen Smith <[log in to unmask]> wrote:

> Indeed - though it could be scripted without the GUI.
> Cheers.
>
>
> On 9 Dec 2011, at 14:35, Michael Harms wrote:
>
> Not to my knowledge, unfortunately.
>
> -MH
>
> On Fri, 2011-12-09 at 13:48 +0100, Diederick Stoffers wrote:
>
> Hi,
>
>
>
> Is there any easy way around using the FEAT GUI for setting up huge
>
> design matrices? It would be great if you could specify text files as
>
> an input in stead of copy/paste into Glm.
>
>
>
> Cheers,
>
>
>
> Diederick
>
>
> Begin forwarded message:
>
>
> From: Michael Harms <[log in to unmask]>
>
>
> Subject: Re: [FSL] large quantity glm setup
>
>
> Date: 7 juli 2011 15:40:03 GMT+02:00
>
>
> To: [log in to unmask]
>
>
> Reply-To: FSL - FMRIB's Software Library <[log in to unmask]>
>
>
>
> The FEAT GUI can be quite challenging to work with when specifying
>
> large
>
> designs, as it becomes very slow in responding and updating.  How
>
> big of
>
> a design are you trying to specify?  Are you having an issue pasting
>
> in
>
> the values themselves, or is it "freezing" after you Click OK within
>
> the
>
> Paste Window?
>
>
> That said, with patience we've always been able to use the Paste
>
> feature
>
> to accomplish what we need.
>
>
> cheers,
>
> -MH
>
>
> On Wed, 2011-07-06 at 15:13 -0700, Amy Zhong Sheng Zheng wrote:
>
> Thank you for the response. Do I just copy the numbers from excel
>
> (or
>
> whichever) and paste them after opening up the paste button?
>
> Because I
>
> just tried that and every time I tried to paste the numbers in the
>
> paste window, feat would freeze on me. Have any ideas why that
>
> might
>
> be the case?
>
>
> On Wed, Jul 6, 2011 at 1:59 PM, Michael Harms
>
> <[log in to unmask]>
>
> wrote:
>
>       Sure, create it in Excel, Matlab, text editor, or whatever
>
> is
>
>       most
>
>       convenient and just use the "Paste" button under "Full
>
> model
>
>       setup".
>
>
>       cheers,
>
>       -MH
>
>
>
>
>
>       On Wed, 2011-07-06 at 20:55 +0100, Amy wrote:
>
> Hi all,
>
>
> I'm doing an anova with multiple factors and levels with
>
>       many inputs, so setting up the 1's and -1's on the glm has
>
>       been very tedious. I was wondering if anyone knows a
>
>       faster/efficient way to fill in the values? Is there a way
>
> to
>
>       export from excel and fill that in the design.fsf?
>
>
> Thanks,
>
> Amy
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------------
> Stephen M. Smith, Professor of Biomedical Engineering
> Associate Director,  Oxford University FMRIB Centre
>
> FMRIB, JR Hospital, Headington, Oxford  OX3 9DU, UK
> +44 (0) 1865 222726  (fax 222717)
> [log in to unmask]    http://www.fmrib.ox.ac.uk/~steve
> ---------------------------------------------------------------------------
>
>
>
>


-- 
__________________________________________________________
Thomas Nichols, PhD
Principal Research Fellow, Head of Neuroimaging Statistics
Department of Statistics & Warwick Manufacturing Group
University of Warwick, Coventry  CV4 7AL, United Kingdom

Web: http://go.warwick.ac.uk/tenichols
Email: [log in to unmask]
Phone, Stats: +44 24761 51086, WMG: +44 24761 50752
Fax:  +44 24 7652 4532