Learn R Programming

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

sasLM (version 0.6.1)

'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

729

Version

0.6.1

License

GPL-3

Maintainer

Kyun-Seop Bae

Last Published

July 14th, 2021

Functions in sasLM (0.6.1)

BasicUtil

Internal Functions
Coll

Collinearity Diagnostics
CONTR

F Test with a Set of Contrasts
CIest

Confidence Interval Estimation
BY

Analysis BY variable
Cor.test

Correlation test of multiple numeric columns
Diffogram

Plot Pairwise Differences
CV

Coefficient of Variation in percentage
GLM

General Linear Model similar to SAS PROC GLM
G2SWEEP

Generalized inverse matrix of type 2, g2 inverse
ANOVA

Analysis of Variance similar to SAS PROC ANOVA
EMS

Expected Mean Square Formula
LSM

Least Square Means
LCL

Lower Confidence Limit
PDIFF

Pairwise Difference
ESTM

Estimate Linear Function
Pcor.test

Partial Correlation test of multiple columns
REG

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

Inter-Quartile Range
BEdata

An Example Data of Bioequivalence Study
Max

Max without NA
Range

Range
Mean

Mean without NA
sasLM-package

'SAS' Linear Model
SkewnessSE

Standard Error of Skewness
SD

Standard Deviation
bk

Beautify the output of knitr::kable
T3MS

Type III Expected Mean Square Formula
Kurtosis

Kurtosis
SS

Sum of Square
KurtosisSE

Standard Error of Kurtosis
Skewness

Skewness
cSS

Sum of Square with a Given Contrast Set
ModelMatrix

Model Matrix
N

Number of observations
SEM

Standard Error of the Sample Mean
SLICE

F Test with Slice
af

Convert some columns of a data.frame to factors
aov1

ANOVA with Type I SS
satt

Satterthwaite Approximation of Pooled Variance and Degree of Freedom
Median

Median without NA
e3

Get a Contrast Matrix for Type III SS
aov3

ANOVA with Type III SS
aov2

ANOVA with Type II SS
lfit

Linear Fit
Min

Min without NA
est

Estimate Linear Functions
T3test

Test Type III SS using error term other than MSE
lr0

Simple Linear Regressions with Each Independent Variable
geoCV

Geometric Coefficient of Variation in percentage
estmb

Estimability Check
pB

Plot Confidence and Prediction Bands for Simple Linear Regression
trimmedMean

Trimmed Mean
pD

Diagnostic Plot for Regression
lr

Linear Regression with g2 inverse
regD

Regression of Conventional Way with Rich Diagnostics
tsum3

Table Summary 3 independent(x) variables
tsum2

Table Summary 2 independent(x) variables
UCL

Upper Confidence Limit
tsum

Table Summary
tsum0

Table Summary 0 independent(x) variable
e2

Get a Contrast Matrix for Type II SS
e1

Get a Contrast Matrix for Type I SS
tsum1

Table Summary 1 independent(x) variable
geoMean

Geometric Mean without NA
is.cor

Is it a corrleation matrix?