Archive for August, 2010

r error: FEXACT error 7

R Error: FEXACT error 7 Testing with small sample size, it is more preferable to use the Fisher’s Exact test than the Chi-square test. fisher.test(counts, simulate.p.value=TRUE) If you have too many rows or columns, you may get an error saying, FEXACT error 7. LDSTP is too small for this problem. Try increasing the size of […]

Read More →

Contingency Table for Categorical data and R

How to create contingency table from categorical data in r. Example: There are three categorical variables x1, x2, x3 measured from wild cats where x1 = gender (male, female) x2 = age (young, kitten, adult) x3 = test result ( positive = 1, negative =0). r table will generate two tables: 2by2 table for each […]

Read More →

Validating assumption of multivariate normal data

Univariate and Multivariate diagnostics Univariate diagnostic (Histogram and QQ plot) Plot a histogram hist(mydata.st, main=”histgram”, xlab=”X values”) Plot QQ plot ## pch =16 (16 is a symbol for a filled circle) qqnorm(mydata.st, main=”QQ plot”, pch=16, col=”navy”) Multivariate dignostics Chi-squre plot We will graph distance vs chsq # function to compute distance between X and X.bar […]

Read More →