getMLE: Calculate the weighted MLE

Description Usage Arguments Examples

Description

This function calculate the weighted MLE for the input covariate matrix x, response vector y, and weight vector w. It returns a list with three elements: par, the weighted MLE; msg, the fitting message; iter, the number of itterations used.

Usage

1
getMLE(x, y, w)

Arguments

x

the input covariate matrix

y

the input response vector

w

the wight vector

Examples

1
2
3
4
5
6
7
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
getMLE(X, Y, 1)

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