inst/doc/sasLM-for-SAS-users.R

## ----setup, include=FALSE-------------------------------------------------------------------------
knitr::opts_chunk$set(comment = NA)
options(width = 100)
library(sasLM)

## -------------------------------------------------------------------------------------------------
GLM(yield ~ block + N*P*K, npk)

## -------------------------------------------------------------------------------------------------
GLM(yield ~ block + N*P*K, npk, BETA=TRUE)$Parameter

## -------------------------------------------------------------------------------------------------
LSM(weight ~ feed, chickwts, "feed")

## -------------------------------------------------------------------------------------------------
PDIFF(weight ~ feed, chickwts, "feed", adj="tukey")

## -------------------------------------------------------------------------------------------------
PDIFF(weight ~ feed, chickwts, "feed", adj="dunnett")

## -------------------------------------------------------------------------------------------------
EMS(yield ~ block + N*P*K, npk)
RanTest(yield ~ block + N*P*K, npk, Random="block")

## -------------------------------------------------------------------------------------------------
REG(mpg ~ wt + hp, mtcars)

## -------------------------------------------------------------------------------------------------
REG(mpg ~ wt, mtcars, HC=TRUE)

## -------------------------------------------------------------------------------------------------
w = mtcars$cyl
head(REG(mpg ~ wt + hp, mtcars, Weights=w, Resid=TRUE)$Fitted)

## -------------------------------------------------------------------------------------------------
TTEST(mtcars$mpg[mtcars$am==0], mtcars$mpg[mtcars$am==1])

## -------------------------------------------------------------------------------------------------
tmtest(5.4, 2.2, 30, 4.8, 2.0, 28)

## -------------------------------------------------------------------------------------------------
UNIV(mtcars$mpg)

## -------------------------------------------------------------------------------------------------
RD(7, 10, 3, 10)
RR(7, 10, 3, 10)
OR(7, 10, 3, 10)

Try the sasLM package in your browser

Any scripts or data that you put into this service are public.

sasLM documentation built on July 14, 2026, 5:06 p.m.