CBregress: Case based linear regression

Description Usage Arguments Details Value References Examples

View source: R/CBregression.R

Description

Fit a case based latent variable regression model.

Usage

1
CBregress(x,y)

Arguments

x,y

Numeric vectors of equal length.

Details

The function CBregress performs a case based univariate linear regression, similairly to lm(y~x). In contrast to lm, the statistical model assumes and estimates a latent variable X such that x-X and y-(a*X+b) are as small errors as possible.

Case based regression is best suited for small samples which are not normally distributed and have errors in both variables.

Value

A list with the following fields.

a

The estimate for the slope parameter

b

The estimate for the intercept parameter

v0

The estimate for the variance of X

vd

The estimate for the error variance of x-X

ve

The estimate for the error variance of y-(a*X+b)

X0

The vector of estimates for the true value X

References

Reinhard Oldenburg (2020). Structural Equation Modeling Comparing Two Approaches. The Mathematica Journal, URL https://content.wolfram.com/uploads/sites/19/2020/12/Oldenburg.pdf .

Examples

1
2
3
4
5
vx=c(1,2,3,4)
vy=c(3,4,4,5)
res=CBregress(vx,vy)
res$a
res$b

ROldenburg/CBregress documentation built on Jan. 5, 2021, 12:12 a.m.