Learn R Programming

spsurvey (version 4.0.0)

localmean.weight2: Internal Function: Recovery from a Singular Value Decomposition Error

Description

This function calculates the initial section of the localmean.weight function and serves to allow recovery from an error in the singular value decomposition function (La.svd) that is called by the generalized inverse function (ginv) in the MASS package.

Usage

localmean.weight2(x, y, prb, nbh)

Arguments

x

Vector of x-coordinates for location of the sample points.

y

Vector of y-coordinates for location of the sample points.

prb

Vector of inclusion probabilities for the sample points.

nbh

Number of neighboring points to use in the calculations.

Value

Either an object of class "try-error" when the ginv function terminates with an error or a generalized inverse matrix when the ginv function terminates normally.