combined analysis of point-level and area-level data

23 views
Skip to first unread message

TheCorinna1994

unread,
Jul 10, 2024, 11:19:40 AM (11 days ago) Jul 10
to R-inla discussion group
Dear all,

I want to build a spatio-temporal model to combine point and area data.

So far I used the code for a spatial model from Paula Moraga's paper: "A geostatistical model for combined analysis of point-level and area-level data using INLA and SPDE" (see below).

I have point data , measured at 240 monitoring stations per week over 5 years. I want to model the data as time series, hence I want to group it by Time:

weather_data<-weather_data %>% mutate(Time=(Year-min(Year))*52+Week)

A_points<-inla.spde.make.A(mesh, loc=as.matrix(weather_data[,c("Longitude","Latitude")]),  group = weather_data$Time)

index_point<- inla.spde.make.index("field_point", n.spde=spde.nonstat$n.spde,
                                  n.group = dim(A_points)[2]/spde.nonstat$n.spde)

Now I have to code the observation matrix for the area data. The data is given per state/block for each week over 5 years for several age groups. I checked which mesh vertices are in which block. But now I do not really understand how the grouping should work.

My spatial version is: 

A_area<-inla.spde.make.A(mesh, loc=as.matrix(area_loc@coords[,1:2]), block=block, block.rescale="sum")

index_area<- inla.spde.make.index("field_area", n.spde=spde.nonstat$n.spde) 

I would appreciate help a lot!

Thanks, 
Corinna

Finn Lindgren

unread,
Jul 10, 2024, 11:32:06 AM (11 days ago) Jul 10
to TheCorinna1994, R-inla discussion group
Hi,

the fmesher functions fm_int(), fm_basis(), and fm_block() can be used if you really want to do this by hand.

But I don't think direct use of inla.stack for these things isn't really something that should be done for new code; we wrote inlabru so we wound't have to help debug code that uses direct matrix and indexing with inla.stack...
The bru_mapper_aggregate() and bru_mapper_logsumexp() classes can handle blockwise aggregation.

See e.g. https://arxiv.org/abs/2407.00791 to get started on aggregated data. (combined areal and point referenced data is just two like() calls that involve some of the same model components, for example).

There's more to it for spatial models with high-resolution covariates, in particular for point pattern data; more papers are in the works showing the details of that.

I'm unfortunately busy with marking an will then be on holiday, so can't help more at the moment.

Finn

--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/r-inla-discussion-group/1fc979ef-b959-4c61-b2c3-ac47b1888fd7n%40googlegroups.com.


--
Finn Lindgren
email: finn.l...@gmail.com

TheCorinna1994

unread,
Jul 16, 2024, 1:55:02 PM (5 days ago) Jul 16
to R-inla discussion group
Dear Finn, 

thanks for the answer. I will have a look at the paper! 

Have a nice holiday,
Corinna

Reply all
Reply to author
Forward
0 new messages