You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在样地(plot)尺度计算采伐事件的年度概率?

样地层面采伐年度概率计算方案

数据语法修正

你提供的R代码存在语法错误,averageInterval字段定义后缺少逗号,修正后的完整代码如下:

df <- data.frame(plot=c("A","A","B","B","C"),
                 tree=c(1,1,2,3,4),
                 year1=c(2000,2000,2005,2005,2007),
                 year2=c(2002,2004,2010,2010,2014),
                 averageInterval=c(3,3,5,5,7),
                 harvest=c(0,1,1,1,0))

核心计算逻辑

样地年度采伐概率的核心是量化样地在观测周期内每年发生采伐事件的可能性,基于你提供的无具体采伐日期的数据集,这里提供两种实用计算方案,可根据研究场景选择。

方案1:保守型估计(按采伐树木的观测周期占比)

假设某棵树在观测周期内被采伐(harvest=1),则该周期内的每一年均视为存在采伐记录。计算步骤如下:

  1. 计算单棵树的观测年数(包含起始和结束年份):
df$observation_years <- df$year2 - df$year1 + 1
  1. 按样地聚合计算年度概率:
library(dplyr)

plot_harvest_prob <- df %>%
  group_by(plot) %>%
  summarise(
    total_observation_years = sum(observation_years),
    harvest_related_years = sum(observation_years[harvest == 1]),
    annual_harvest_probability = harvest_related_years / total_observation_years
  )

运行结果:

# A tibble: 3 × 4
  plot  total_observation_years harvest_related_years annual_harvest_probability
  <chr>                   <dbl>                 <dbl>                       <dbl>
1 A                           8                     5                       0.625
2 B                          11                    11                       1    
3 C                           8                     0                       0    

方案2:频次型估计(按采伐事件数平均到总观测年数)

假设每棵被采伐的树对应一次独立采伐事件,将采伐事件数平均到样地总观测年数中,得到年度概率:

plot_harvest_prob_freq <- df %>%
  group_by(plot) %>%
  summarise(
    total_observation_years = sum(observation_years),
    harvest_event_count = sum(harvest),
    annual_harvest_probability = harvest_event_count / total_observation_years
  )

运行结果:

# A tibble: 3 × 4
  plot  total_observation_years harvest_event_count annual_harvest_probability
  <chr>                   <dbl>               <dbl>                       <dbl>
1 A                           8                   1                       0.125
2 B                          11                   2                       0.182
3 C                           8                   0                       0    

方案选择建议

  • 方案1适合需要最大化采伐风险覆盖的研究场景,概率值偏高,属于保守估计;
  • 方案2适合聚焦采伐事件频次的研究场景,概率值更贴近单位时间内的采伐事件发生频率。

内容的提问来源于stack exchange,提问作者starski

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.05 10:11:31