Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

LMCondDistribution

Generating function for the conditional distribution of a linear regression model.


Description

Generates an object of class "AbscontCondDistribution" which is the conditional distribution of a linear regression model (given the regressor).

Usage

LMCondDistribution(Error = Norm(), theta = 0, intercept = 0, scale = 1)

Arguments

Error

Object of class "AbscontDistribution": error distribution.

theta

numeric vector: regression parameter.

intercept

real number: intercept parameter.

scale

positive real number: scale parameter.

Value

Object of class "AbscontCondDistribution"

Author(s)

See Also

Examples

# normal error distribution
(D1 <- LMCondDistribution(theta = 1)) # corresponds to Norm(cond, 1)
plot(D1)
r(D1)
d(D1)
p(D1)
q(D1)
## in RStudio or Jupyter IRKernel, use q.l(.)(.) instead of q(.)(.)
param(D1)
cond(D1)

d(D1)(0, cond = 1)
d(Norm(mean=1))(0)

E(D1, cond = 1)
E(D1, function(x){x^2}, cond = 2)
E(Norm(mean=2), function(x){x^2})

distrEx

Extensions of Package 'distr'

v2.8.0
LGPL-3
Authors
Matthias Kohl [cre, cph], Peter Ruckdeschel [aut, cph]
Initial release
2019-03-29

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.