m_optim: Function to derive the m index

Description Usage Arguments Author(s) See Also Examples

View source: R/m_optim.R

Description

m_optim is use to find out the index of the independent variable when the variance of the error term is proportional to the independent variable.

Usage

1
m_optim(data, x.col, y.col, from = -2, to = 2, by = 0.5)

Arguments

data

Must be a data frame, and the data data frame contains only the independent variable and the dependent variable, which can not contain other independent variables.

x.col

independent variable of columns in the data .

y.col

dependent variable of columns in the data .

from,to

the starting and (maximal) end values of the sequence.

by

number: increment of the sequence.

Author(s)

Jinquan Lin

See Also

The model fitting function lm ;summary.lm

Examples

1
2
3
4
5
##----

data(table36)
m_optim(data=table36,x.col=2,y.col=3)
m_optim(data=table36,x.col=2,y.col=3,from=1,to=5,by=0.5)

jinimp/zhbit7 documentation built on May 19, 2019, 10:36 a.m.