Learn R Programming

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

sasLM (version 0.9.6)

'SAS' Linear Model

Description

This is a core implementation of 'SAS' procedures for linear models - GLM, REG, ANOVA, FREQ, and UNIVARIATE. 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

730

Version

0.9.6

License

GPL-3

Maintainer

Kyun-Seop Bae

Last Published

March 6th, 2023

Functions in sasLM (0.9.6)

LCL

Lower Confidence Limit
ORcmh

Odds Ratio of two groups with strata by CMH method
Skewness

Skewness
QuartileRange

Inter-Quartile Range
Pcor.test

Partial Correlation test of multiple columns
SLICE

F Test with Slice
RDmn

Risk Difference and Score CI between two groups with strata by the MN method
Kurtosis

Kurtosis
RD

Risk Difference between two groups
ORmn

Odds Ratio and Score CI of two groups with strata by MN method
SkewnessSE

Standard Error of Skewness
RDmn1

Risk Difference and Score CI between two groups without strata by the MN method
SEM

Standard Error of the Sample Mean
T3test

Test Type III SS using error term other than MSE
KurtosisSE

Standard Error of Kurtosis
ORinv

Odds Ratio of two groups with strata by inverse variance method
UCL

Upper Confidence Limit
ORmn1

Odds Ratio and Score CI of two groups without strata by the MN method
RDinv

Risk Difference between two groups with strata by inverse variance method
cSS

Sum of Square with a Given Contrast Set
T3MS

Type III Expected Mean Square Formula
geoCV

Geometric Coefficient of Variation in percentage
LSM

Least Square Means
corFisher

Correlation test by Fisher's Z transformation
estmb

Estimability Check
Median

Median without NA
lr

Linear Regression with g2 inverse
lfit

Linear Fit
PDIFF

Pairwise Difference
UNIV

Univariate Descriptive Statistics
lr0

Simple Linear Regressions with Each Independent Variable
e1

Get a Contrast Matrix for Type I SS
e2

Get a Contrast Matrix for Type II SS
N

Number of observations
REG

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

Table Summary 3 independent(x) variables
pB

Plot Confidence and Prediction Bands for Simple Linear Regression
RRmn1

Relative Risk and Score CI of two groups without strata by by MN method
RanTest

Test with Random Effects
aov3

ANOVA with Type III SS
RRinv

Relative Risk of two groups with strata by inverse variance method
Min

Min without NA
ScoreCI

Score CI of a proportion
SS

Sum of Square
RR

Relative Risk of the two groups
RRmn

Relative Risk and Score CI of two groups with strata by the MN method
est

Estimate Linear Functions
regD

Regression of Conventional Way with Rich Diagnostics
af

Convert some columns of a data.frame to factors
WhiteTest

White's Model Specification Test
e3

Get a Contrast Matrix for Type III SS
is.cor

Is it a correlation matrix?
bk

Beautify the output of knitr::kable
geoMean

Geometric Mean without NA
aov1

ANOVA with Type I SS
SD

Standard Deviation
Range

Range
sasLM-package

'SAS' Linear Model
aov2

ANOVA with Type II SS
tsum1

Table Summary 1 independent(x) variable
pResD

Residual Diagnostic Plot for Regression
pD

Diagnostic Plot for Regression
satt

Satterthwaite Approximation of Variance and Degree of Freedom
trimmedMean

Trimmed Mean
tsum2

Table Summary 2 independent(x) variables
tsum

Table Summary
tsum0

Table Summary 0 independent(x) variable
CIest

Confidence Interval Estimation
BEdata

An Example Data of Bioequivalence Study
Diffogram

Plot Pairwise Differences
Cor.test

Correlation test of multiple numeric columns
Coll

Collinearity Diagnostics
BY

Analysis BY variable
CV

Coefficient of Variation in percentage
EMS

Expected Mean Square Formula
BasicUtil

Internal Functions
DoEdata

Example Datasets
CONTR

F Test with a Set of Contrasts
Max

Max without NA
Mean

Mean without NA
OR

Odds Ratio of two groups
ESTM

Estimate Linear Function
ModelMatrix

Model Matrix
G2SWEEP

Generalized inverse matrix of type 2, g2 inverse
GLM

General Linear Model similar to SAS PROC GLM