between_max {xtsum}R Documentation

Compute the maximum between-group

Description

This function calculates the maximum between-group in a panel data.

Usage

between_max(data, variable, id = NULL, t = NULL, na.rm = FALSE)

Arguments

data

A data.frame or pdata.frame object containing the panel data.

variable

The variable for which the maximum between-group effect is calculated.

id

(Optional) Name of the individual identifier variable.

t

(Optional) Name of the time identifier variable.

na.rm

Logical. Should missing values be removed? Default is FALSE.

Value

The maximum between-group effect.

Examples

# Example using pdata.frame
data("Gasoline", package = "plm")
Gas <- pdata.frame(Gasoline, index = c("country", "year"), drop.index = TRUE)
between_max(Gas, variable = "lgaspcar")

# Using regular data.frame with id and t specified
data("Crime", package = "plm")
between_max(Crime, variable = "crmrte", id = "county", t = "year")


[Package xtsum version 0.1.0 Index]