panelr1.0.0 package

Regression Models and Utilities for Repeated Measures and Panel Data

are_varying

Check if variables are constant or variable over time.

as_parser_list

Convert WBFormula to list (for backward compatibility)

asym_gee

Asymmetric effects models fit with GEE

asym

Estimate asymmetric effects models using first differences

balance_panel

Balance panel data by filling gaps

basis_function_registry

Registry of known basis functions and their reproducible attributes

basis_utils

Utilities for handling basis expansion functions in formulas

bt_if_needed

Conditionally add backticks based on syntax validity

bt

Add backticks to names

build_panel_data

Lightweight panel_data constructor

complete_data

Filter out entities with too few observations

detect_matrix_terms

Check if any terms in a formula are matrix-returning

evaluate_basis_term

Evaluate a basis function on pooled data and extract attributes

expand_basis_columns

Expand a basis matrix into individual columns in a data frame

expand_matrix_terms_in_data

Expand matrix terms into data columns

extract_basis_variable

Extract the primary variable from a basis function call

extract_fn_name

Extract the function name from a formula term

extract_ranef_vars

Extract variables from random effects terms

fdm_tidiers

Tidy methods for fdm and asym models

fdm

Estimate first differences models using GLS

formula.wbm

Retrieve model formulas from wbm objects

generate_basis_colnames

Generate column names for expanded basis matrix

get_interactions.WBFormula

Get all interaction labels from WBFormula

get_meanvar

Get mean variable name for a term

get_wave

Retrieve panel_data metadata

has_gaps

Check if panel data has gaps

has_interactions

Check if WBFormula has interactions

heise

Estimate Heise stability and reliability coefficients

InteractionConfig

Interaction configuration

is_known_basis_fn

Check if a function is a known basis function

is_matrix_term

Check if a term returns a matrix when evaluated

is_panel_sorted

Check if panel data is properly sorted

is_panel

Check if object is panel_data

is_varying_term

Check if a variable is time-varying in WBFormula

is_within_model

Check if model uses within-transformation

line_plot

Plot trends in longitudinal variables

long_panel

Convert wide panels to long format

make_diff_data

Generate differenced and asymmetric effects data

make_interaction_config

Create InteractionConfig from wbm() arguments

make_wb_data

Prepare data for within-between modeling

model_frame

Make model frames for panel_data objects

nobs.wbm

Number of observations used in wbm models

panel_data-vctrs

Internal vctrs methods

panel_data

Create panel data frames

predict.wbgee

Predictions and simulations from within-between GEE models

predict.wbm

Predictions and simulations from within-between models

print.WBFormula

Print method for WBFormula

process_matrix_term

Process a matrix term for within-between decomposition

reconstruct_basis_call

Reconstruct a basis function call with a modified variable

reexports

Objects exported from other packages

scan_gaps

Scan for gaps in panel data

should_demean_ints

Determine if interactions should be de-meaned

summary.panel_data

Summarize panel data frames

un_bt

Remove backticks from names

unpanel

Convert panel_data to regular data frame

update_pf_for_matrix_terms

Update parsed formula object for matrix terms

use_old_style_ints

Determine if "old-style" interaction processing is needed

WBFormula_from_parser

Create WBFormula from parser output (for migration)

WBFormula

WBFormula class for within-between model formula representation

wbgee_tidiers

Tidy methods for wbgee models

wbgee

Panel regression models fit with GEE

wbm_stan

Bayesian estimation of within-between models

wbm_tidiers

Tidy methods for wbm models

wbm-class

Within-Between Model (wbm) class

wbm

Panel regression models fit via multilevel modeling

widen_panel

Convert long panel data to wide format

Provides an object type and associated tools for storing and wrangling panel data. Implements several methods for creating regression models that take advantage of the unique aspects of panel data. Among other capabilities, automates the "within-between" (also known as "between-within" and "hybrid") panel regression specification that combines the desirable aspects of both fixed effects and random effects econometric models and fits them as multilevel models (Allison, 2009 <doi:10.4135/9781412993869.d33>; Bell & Jones, 2015 <doi:10.1017/psrm.2014.7>). These models can also be estimated via generalized estimating equations (GEE; McNeish, 2019 <doi:10.1080/00273171.2019.1602504>) and Bayesian estimation is (optionally) supported via 'Stan'. Supports estimation of asymmetric effects models via first differences (Allison, 2019 <doi:10.1177/2378023119826441>) as well as a generalized linear model extension thereof using GEE.

  • Maintainer: Jacob A. Long
  • License: MIT + file LICENSE
  • Last published: 2026-01-21