Description Usage Arguments Details Value Examples
Accounts for averaging over observations, to account for signal leakage with nearby observations. See details.
1 2 3 4 |
.Object |
Object of class |
alpha |
The diffusion coefficient. See details. |
av_dist |
The distance within which observations are assumed to be coupled. |
This function sets the diffusion parameter α in the model
z = P(α)y + e
where the matrix P(α) is defined as
P^{(i,j)} = ≤ft\{ \begin{array}{ll} α, & i \sim j, (n_i)θ > 0.9 \\ [2ex] 1 - (n_i)θ & i = j, (n_i)θ > 0.9 \\ [2ex] \displaystyle \frac{1}{(n_i)+1} & \textrm{otherwise} \end{array} \right.
where n_i denotes the number of neighbours of observation i and \sim denotes ‘neighbour of’.
The matrix describes the proportion of signal n_iα which should be attributed to the spatial regions associated with the
neighbouring observations. If n_iθ exceeds 0.9 (indicative of poor localisation), the observation
is assumed to be an equal average of itself and its neighbours. Two (observations are assigned as neighbours if their geometric
centres are distanced by less than av_dist
.
Object of class Obj
with updated diffusion parameter alpha0
and averaging matrix P
.
1 2 3 4 5 6 7 8 9 10 | # Create three polygon 'footprints'
pol_df <- rbind(data.frame(id=1,x1=0,x2=0,x3=1,x4=1,y1=0,y2=1,y3=1,y4=0,t=0),
data.frame(id=2,x1=1,x2=1,x3=2,x4=2,y1=1,y2=2,y3=2,y4=1,t=0),
data.frame(id=3,x1=2,x2=2,x3=3,x4=3,y1=2,y2=3,y3=3,y4=2,t=0))
df <- rbind(data.frame(id=1,x=0.5,y=0.5,z=1,std=1,t=0),
data.frame(id=2,x=1.5,y=1.5,z=2,std=1,t=0),
data.frame(id=3,x=2.5,y=2.5,z=1.5,std=1,t=0))
O <- Obs_poly(df=df,pol_df=pol_df)
plot(O,"z")
Odiff <- setalpha(O,0.1,av_dist=2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.