13.07.2015 Views

Download pdf guide - VSN International

Download pdf guide - VSN International

Download pdf guide - VSN International

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

34 3 Syntaxplaces in the GenStat language where a directive has both an option and a parameter withthe same name.) So you can use the VALUES parameter of VARIATE to specify differentsets of values for x and y, as follows:VARIATE x, y; VALUES=!(1,2,3), !(4,5,6)x now contains the values 1, 2, and 3, and y contains 4, 5, and 6.3.9 PracticalThe first of April 2000 was a Saturday. Using unnamed structures, write a PRINTstatement to print the day numbers in the month, with the day of the week and the weeknumber side by side:1 Saturday 12 Sunday 23 Monday 2Using the unnamed structures from your program, create a variate to hold the daynumbers, a variate to store the week number and a text to store the day of the week.Create a pointer using the POINTER directive to point to the three data structures, andprint the contents of the pointer to the Output window.3.10 Formulae to define statistical modelsStatistical models for analyses like regression, analysis of variance and the analysis oflinear mixed models by REML are defined in GenStat by model formulae. Many of themenus of GenStat for Windows define these automatically. However, to use commandsor the more advanced menus you will need to specify your own formulae.In its simplest form, a model formula is a list of model terms, linked by the operator"+". Each term defines a set of parameters to be fitted in a statistical model. For example,if we have factors N and S, the formulaN + Sspecifies two terms representing the main effects of the factors.You can use commas in lists of factors or variates instead of pluses. So, for example,we could specify a multiple linear regression involving variates X and Y by eitherorX + YX, Y(see Section 6.3 for examples).Higher-order terms, like interactions, are specified as series of factors separated bydots, but their precise meaning depends on which other terms the formula contains, as weexplain below.The other operators provide ways of specifying a formula more succinctly, and ofrepresenting its structure more clearly.The crossing operator * is used to specify factorial structures. The formulaN * Sis used to specify the two-way analysis of variance described in Section 7.1, where thefactors represent amounts of nitrogen and sulphur treatments applied in a fieldexperiment. This is expanded to become the formulaN + S + N.Swhich has three terms: N for the nitrogen main effect, S for the main effect of sulphur,and N.S for the nitrogen by sulphur interaction. Higher-order terms like N.S represent

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!