Learn R Programming

gss (version 2.2-8)

mkint: Generating Integrals of Basis Terms

Description

Generate integrals of basis terms for use in the ssden1 suite.

Usage

mkint(mf, type, id.basis, quad, term, rho, rho.int)
mkint2(mf, type, id.basis, quad, term)

Value

mkint returns a list of five elements.

s

First moments of phi's.

r

First moments of rk's.

s.rho

Cross moments of phi*log(rho).

r.rho

Cross moments of rk*log(rho).

var.type

Types for variables.

mkint2 returns a list of three elements.

ss

Second moments of phi's.

sr

Cross moments of phi's and rk's.

rr

Second moments of rk.

Arguments

mf

Model frame of the model formula.

type

List specifying the type of spline for each variable.

id.basis

Index of observations to be used as "knots."

quad

Quadratures on marginal domains, weighted by rho.

term

Model terms generated by mkterm.

rho

Marginal log(rho) on quadrature points.

rho.int

Marginal integrals of log(rho).

Details

mkint calculates the first moments of basis functions with respect to the indepent joint density rho; mkint2 calculates the second moments for use in project.ssden1.