Learn R Programming

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

sasLM (version 0.9.12)

'SAS' Linear Model

Description

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

1,456

Version

0.9.12

License

GPL-3

Maintainer

Kyun-Seop Bae

Last Published

September 7th, 2023

Functions in sasLM (0.9.12)

ORmn1

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

Estimate Linear Function
SLICE

F Test with Slice
PDIFF

Pairwise Difference
REG

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

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

Score Confidence Interval for a Proportion or a Binomial Distribution
SS

Sum of Square
SEM

Standard Error of the Sample Mean
Median

Median without NA
Skewness

Skewness
Min

Min without NA
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
RDmn1

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

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

Risk Difference between two groups
RR

Relative Risk of the two groups
RDmn

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

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

Type III Expected Mean Square Formula
ModelMatrix

Model Matrix
SkewnessSE

Standard Error of Skewness
T3test

Test Type III SS using error term other than MSE
af

Convert some columns of a data.frame to factors
RRmn1

Relative Risk and Score CI of two groups without strata by by MN method
Pcor.test

Partial Correlation test of multiple columns
N

Number of observations
TTEST

Independent two groups t-test comparable to PROC TTEST
RanTest

Test with Random Effects
UCL

Upper Confidence Limit
aov1

ANOVA with Type I SS
lfit

Linear Fit
lr

Linear Regression with g2 inverse
tsum2

Table Summary 2 independent(x) variables
aov2

ANOVA with Type II SS
OR

Odds Ratio of two groups
estmb

Estimability Check
satt

Satterthwaite Approximation of Variance and Degree of Freedom
bk

Beautify the output of knitr::kable
tsum1

Table Summary 1 independent(x) variable
ORcmh

Odds Ratio of two groups with strata by CMH method
aspirinCHD

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

ANOVA with Type III SS
WhiteTest

White's Model Specification Test
geoCV

Geometric Coefficient of Variation in percentage
sasLM-package

'SAS' Linear Model
e3

Get a Contrast Matrix for Type III SS
e1

Get a Contrast Matrix for Type I SS
ztest

Test for the difference of two groups' means
pB

Plot Confidence and Prediction Bands for Simple Linear Regression
UNIV

Univariate Descriptive Statistics
trimmedMean

Trimmed Mean
tmtest

Independent two means test similar to t.test with summarized input
e2

Get a Contrast Matrix for Type II SS
pD

Diagnostic Plot for Regression
pResD

Residual Diagnostic Plot for Regression
QuartileRange

Inter-Quartile Range
corFisher

Correlation test by Fisher's Z transformation
geoMean

Geometric Mean without NA
Range

Range
regD

Regression of Conventional Way with Rich Diagnostics
cSS

Sum of Square with a Given Contrast Set
SD

Standard Deviation
is.cor

Is it a correlation matrix?
lr0

Simple Linear Regressions with Each Independent Variable
est

Estimate Linear Functions
tsum3

Table Summary 3 independent(x) variables
vtest

F-Test for the ratio of two groups' variances
tsum

Table Summary
mtest

Independent two groups t-test similar to PROC TTEST with summarized input
tsum0

Table Summary 0 independent(x) variable
BasicUtil

Internal Functions
CIest

Confidence Interval Estimation
Coll

Collinearity Diagnostics
Cor.test

Correlation test of multiple numeric columns
CONTR

F Test with a Set of Contrasts
Diffogram

Plot Pairwise Differences
CV

Coefficient of Variation in percentage
BY

Analysis BY variable
Max

Max without NA
EMS

Expected Mean Square Formula
Mean

Mean without NA
KurtosisSE

Standard Error of Kurtosis
LCL

Lower Confidence Limit
LSM

Least Square Means
G2SWEEP

Generalized inverse matrix of type 2, g2 inverse
Kurtosis

Kurtosis
DoEdata

Example Datasets
BEdata

An Example Data of Bioequivalence Study
GLM

General Linear Model similar to SAS PROC GLM