Learn R Programming

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

sasLM (version 0.9.8)

'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.8

License

GPL-3

Maintainer

Kyun-Seop Bae

Last Published

May 6th, 2023

Functions in sasLM (0.9.8)

Mean

Mean without NA
Max

Max without NA
G2SWEEP

Generalized inverse matrix of type 2, g2 inverse
GLM

General Linear Model similar to SAS PROC GLM
KurtosisSE

Standard Error of Kurtosis
ORmn1

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

Odds Ratio of two groups with strata by CMH method
OR

Odds Ratio of two groups
PDIFF

Pairwise Difference
ESTM

Estimate Linear Function
Median

Median without NA
Min

Min without NA
RD

Risk Difference between two groups
RDinv

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

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

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

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

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

Test with Random Effects
RRmn1

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

Model Matrix
N

Number of observations
REG

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

Relative Risk of the two groups
RDmn

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

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

Standard Error of the Sample Mean
UCL

Upper Confidence Limit
UNIV

Univariate Descriptive Statistics
SLICE

F Test with Slice
corFisher

Correlation test by Fisher's Z transformation
e1

Get a Contrast Matrix for Type I SS
aov1

ANOVA with Type I SS
aov2

ANOVA with Type II SS
Pcor.test

Partial Correlation test of multiple columns
af

Convert some columns of a data.frame to factors
bk

Beautify the output of knitr::kable
Skewness

Skewness
estmb

Estimability Check
est

Estimate Linear Functions
Range

Range
SD

Standard Deviation
SkewnessSE

Standard Error of Skewness
WhiteTest

White's Model Specification Test
pB

Plot Confidence and Prediction Bands for Simple Linear Regression
cSS

Sum of Square with a Given Contrast Set
T3test

Test Type III SS using error term other than MSE
T3MS

Type III Expected Mean Square Formula
pResD

Residual Diagnostic Plot for Regression
QuartileRange

Inter-Quartile Range
e2

Get a Contrast Matrix for Type II SS
tsum0

Table Summary 0 independent(x) variable
regD

Regression of Conventional Way with Rich Diagnostics
tsum1

Table Summary 1 independent(x) variable
pD

Diagnostic Plot for Regression
sasLM-package

'SAS' Linear Model
satt

Satterthwaite Approximation of Variance and Degree of Freedom
geoCV

Geometric Coefficient of Variation in percentage
geoMean

Geometric Mean without NA
tsum2

Table Summary 2 independent(x) variables
tsum3

Table Summary 3 independent(x) variables
trimmedMean

Trimmed Mean
tsum

Table Summary
lr

Linear Regression with g2 inverse
lr0

Simple Linear Regressions with Each Independent Variable
e3

Get a Contrast Matrix for Type III SS
aspirinCHD

An example data for meta-analysis - aspirin in coronary heart disease
aov3

ANOVA with Type III SS
ScoreCI

Score Confidence Interval for a Proportion or a Binomial Distribution
SS

Sum of Square
lfit

Linear Fit
is.cor

Is it a correlation matrix?
DoEdata

Example Datasets
CIest

Confidence Interval Estimation
Diffogram

Plot Pairwise Differences
BY

Analysis BY variable
CV

Coefficient of Variation in percentage
Coll

Collinearity Diagnostics
CONTR

F Test with a Set of Contrasts
Cor.test

Correlation test of multiple numeric columns
BasicUtil

Internal Functions
BEdata

An Example Data of Bioequivalence Study
Kurtosis

Kurtosis
LCL

Lower Confidence Limit
EMS

Expected Mean Square Formula
LSM

Least Square Means