twostep: The twostep algorithm

Description Usage Arguments Examples

Description

This function implement the OSMAC method for the input covariate matrix @param X, response vector Y, first step sample size r1, the second step sample size r2, and the method to use. It returns a list with three elements: par, the weighted MLE; se, the standard errors; msg, the fitting message; iter, the number of itterations used; method, the method used.

Usage

1
twostep(X, Y, r1, r2, method = c("mvc", "mmse", "uni"))

Arguments

X

the input covariate matrix

Y

the input response vector

r1

the first step sample size

r2

the second step sample size

method

the method to use

Examples

1
2
3
4
5
6
7
8
library(OSMAC)
dat <- adult.train
X <- as.matrix(dat[,c(1,3,5,12:13)])
X <- t(t(X) / apply(X, 2, sd))
X <- cbind(1, X)
Y <- as.numeric(dat[,15]) - 1
set.seed(0)
twostep(X, Y, 200, 800, "mmse")

Ossifragus/OSMAC documentation built on May 7, 2019, 9:29 p.m.