# Research Statistics Central

Blogging on use of SAS and R software to perform statistical tasks for research data...

Blogging on use of SAS and R software to perform statistical tasks for research data...

- Get link
- Other Apps

Recent posts

- Get link
- Other Apps

No guarantees, but roughly if means differ by 3*SE then they are statistically significant. This is based on the Least Significant Difference, which is 2*sqrt(2)*SE. Often people use non-overlapping confidence intervals as a decision rule, but this is equivalent to 4*SE, which is a bit conservative. Things that make 3*SE fail: 1) Actually statistical differences depend on the standard error of difference, SED, not SE. Anything in the model that makes these differ will make the rule fail, such as covariates and blocking factors. 2) In general, mixed models with random effects will make the rule fail, because random variance is included in SE, but not in SED. But this will make 3*SE rule conservative, 3*SED will be even smaller. If 3*SE suggests a statistical difference, difference most likely exists. Also take a look at Error Bars paper .

- Get link
- Other Apps

Objective and Background : You have text data that is UTF encoded and need SAS/R to read and write datasets with that encoding. If you have ever printed or viewed text information, and seen something like Giuffr?Ÿ’e?ƒe?Ÿƒ?ÿ?›ƒ?ªƒ?›?Ÿ’e›ƒ?ª?Ÿƒeee, then you are running into this encoding issue. Computers store text using numbers, with each number assigned to a particular character. See https://en.wikipedia.org/wiki/ASCII to find that the character & is stored as 38 when using the ASCII encoding. Unicode is popular internationally because it encodes special characters such as accented letters, and UTF-8 is a widely used version ( https://en.wikipedia.org/wiki/UTF-8 ). In UTF-8 the & character is stored as 26, and you can imagine how the jumbled example above arises from the confusion of what letters are being stored. Solution 1 : Use options to request that individual datasets be read and written in a particular encoding. In SAS, specify encoding options on the vario

- Get link
- Other Apps

Objective : Transformed data, for example log(y), is analyzed to correct normality or equal variance requirements. But we want to report means and standard errors in the original units. SAS example : data one; do treat=1 to 3; do rep=1 to 5; y=10 + treat+ exp(rannor(111)); logy=log(y); output; end;end; run; proc mixed plots=all; class treat; model y=treat; lsmeans treat/pdiff; run; proc mixed plots=all; class treat; model logy=treat; lsmeans treat/pdiff; run; The original data, variable y, might have units of pounds. If a transformation is needed, we simply calculate a new variable by applying a mathematical function known to improve normality or equal variance, and run the same analysis on the new variable. Commonly used choices are listed in the second table below. However, looking at the results for both analyses we see treat Mean Y SE Y Mean logY SE logY BT Mean BT SE 1 12.55 0.771 2.52 0.054 12.43 0.67 The

- Get link
- Other Apps

Objective : I am running a statistical analysis in SAS, and the default ODS graphics look good, but I need them to be publication quality. SAS can automatically create some nice graphs, and has greatly increased the availability of graphs within procedures. If you like what you see, you might copy graphs directly from the SAS output window, or possibly you save graphs and output to a pdf or other external file format. But this output will be low quality, generally 75 dpi. Instead, add the following statements to write graphics directly to files, allowing control of format and quality. ods graphics on / width=7in imagefmt=tiff imagemap=off imagename="MyPlot" border=off; ods listing file="Body.rtf" style=journal gpath="." dpi=600; Once these statements have been submitted, all graphs created by subsequent procedures will be written to files named MyPlotxx.tiff, where xx will be sequential numbers. The tiff opt

- Get link
- Other Apps

Objective : You are running ANOVAs or regressions in SAS, and wish there was a way to avoid writing the dozens of commands needed to conduct the analysis and generate recommended diagnostics and summary of results, not to mention the hundreds of possible options that might be needed to access recommended methods. A possible solution is to download a copy of danda.sas below, and from DAWG website (which may be converted to the blog DAWGuide ) or the user manual, learn to use a macro to run the dozens of commands with one statement. We will also have future posts covering various uses of danda.sas, giving examples as always. danda.sas is under continued development, check this link for updates quarterly. Current version is 2.12.028 Download danda.sas Example : You have an RBD split-plot design, so typical SAS code for mixed model ANOVA is proc mixed data=one; class block treat week; model height = treat | week / outp=rrr; random block block*treat; ls

- Get link
- Other Apps