Learn R Programming

⚠️There's a newer version (0.10.6) of this package.Take me there.

sasLM (version 0.6.5)

'SAS' Linear Model

Description

This is a core implementation of 'SAS' procedures for linear models - GLM, REG, and ANOVA. Some R packages provide type II and type III SS. However, the results of nested and complex designs are often different from those of 'SAS.' Different results does not necessarily mean incorrectness. However, many wants the same results to SAS. This package aims to achieve that. Reference: Littell RC, Stroup WW, Freund RJ (2002, ISBN:0-471-22174-0).

Copy Link

Version

Install

install.packages('sasLM')

Monthly Downloads

895

Version

0.6.5

License

GPL-3

Maintainer

Kyun-Seop Bae

Last Published

January 20th, 2022

Functions in sasLM (0.6.5)

ESTM

Estimate Linear Function
Kurtosis

Kurtosis
Diffogram

Plot Pairwise Differences
Cor.test

Correlation test of multiple numeric columns
CIest

Confidence Interval Estimation
est

Estimate Linear Functions
KurtosisSE

Standard Error of Kurtosis
CONTR

F Test with a Set of Contrasts
BY

Analysis BY variable
SLICE

F Test with Slice
pB

Plot Confidence and Prediction Bands for Simple Linear Regression
pD

Diagnostic Plot for Regression
SEM

Standard Error of the Sample Mean
ModelMatrix

Model Matrix
Coll

Collinearity Diagnostics
CV

Coefficient of Variation in percentage
LSM

Least Square Means
N

Number of observations
SkewnessSE

Standard Error of Skewness
T3MS

Type III Expected Mean Square Formula
Max

Max without NA
Mean

Mean without NA
Range

Range
aov1

ANOVA with Type I SS
estmb

Estimability Check
tsum

Table Summary
geoMean

Geometric Mean without NA
geoCV

Geometric Coefficient of Variation in percentage
tsum0

Table Summary 0 independent(x) variable
BasicUtil

Internal Functions
Pcor.test

Partial Correlation test of multiple columns
PDIFF

Pairwise Difference
SD

Standard Deviation
G2SWEEP

Generalized inverse matrix of type 2, g2 inverse
SS

Sum of Square
Skewness

Skewness
T3test

Test Type III SS using error term other than MSE
UCL

Upper Confidence Limit
aov3

ANOVA with Type III SS
cSS

Sum of Square with a Given Contrast Set
e1

Get a Contrast Matrix for Type I SS
is.cor

Is it a corrleation matrix?
lfit

Linear Fit
tsum1

Table Summary 1 independent(x) variable
aov2

ANOVA with Type II SS
GLM

General Linear Model similar to SAS PROC GLM
lr

Linear Regression with g2 inverse
lr0

Simple Linear Regressions with Each Independent Variable
satt

Satterthwaite Approximation of Pooled Variance and Degree of Freedom
bk

Beautify the output of knitr::kable
tsum2

Table Summary 2 independent(x) variables
trimmedMean

Trimmed Mean
Median

Median without NA
Min

Min without NA
af

Convert some columns of a data.frame to factors
UNIV

Univariate Descriptive Statistics
e2

Get a Contrast Matrix for Type II SS
e3

Get a Contrast Matrix for Type III SS
sasLM-package

'SAS' Linear Model
regD

Regression of Conventional Way with Rich Diagnostics
tsum3

Table Summary 3 independent(x) variables
LCL

Lower Confidence Limit
QuartileRange

Inter-Quartile Range
REG

Regression of Linear Least Square, similar to SAS PROC REG
ANOVA

Analysis of Variance similar to SAS PROC ANOVA
EMS

Expected Mean Square Formula
BEdata

An Example Data of Bioequivalence Study