Package 'LatSquare'

Title: Analysis of Latin Square and Semi-Latin Square Designs
Description: Provides functions for the analysis of Latin Square and Semi-Latin Square (Latin Rectangle) experimental designs, including analysis of variance (ANOVA), least significant difference (LSD) tests, and calculation of summary statistics. The implemented methods follow Munzert (1992, ISBN: 3-489-53410-7).
Authors: Heinrich Holzner [aut, cre]
Maintainer: Heinrich Holzner <[email protected]>
License: GPL-3
Version: 0.4.1
Built: 2026-06-23 16:31:52 UTC
Source: https://github.com/cran/LatSquare

Help Index


Wrapper for Excel input

Description

Reads an Excel file and calls LQuad_df.

Usage

LQuad(
  file_path,
  sheet_name,
  block_col,
  column_col,
  treatment_col,
  response_cols
)

Arguments

file_path

Path to Excel file

sheet_name

Sheet name

block_col

Column name for block factor

column_col

Column name for column factor

treatment_col

Column name for treatment factor

response_cols

Vector of response variable column names

Value

A named list identical to the output of LQuad_df(), i.e. ANOVA results, LSD values and means for each response variable.

Examples

file <- system.file("extdata", "munzert_example_tab4_9.xlsx",
                    package = "LatSquare")

res <- LQuad(
  file_path = file,
  sheet_name = "Kartoffeln",
  block_col = "Block",
  column_col = "Saeule",
  treatment_col = "VNr",
  response_cols = "ParzErtrag_in_kg"
)

res

Analysis of a Latin Square / Semi Latin Square

Description

Performs ANOVA for a Latin square or semi-Latin square (Latin rectangle) design and calculates LSD values and treatment means. The implemented methods follow Munzert (1992, ISBN: 3-489-53410-7).

Usage

LQuad_df(data, block_col, column_col, treatment_col, response_cols)

Arguments

data

Data frame containing the experimental data

block_col

Column name for block factor

column_col

Column name for column factor

treatment_col

Column name for treatment factor

response_cols

Vector of response variable column names

Value

A named list with one element per response variable. Each element contains:

Design

List with design parameters: number of blocks, columns, treatments, factor a, number of observations, and type of design (Latin square or Latin rectangle).

ANOVA

Data frame with analysis of variance including degrees of freedom (DF), sum of squares (SS), mean squares (MS), F-values and p-values.

LSD

Data frame containing least significant difference values for significance levels 0.05 and 0.01.

Means

List of means including overall mean as well as means for blocks, columns, and treatments.

Examples

file <- system.file("extdata", "munzert_example_tab4_9.xlsx",
                   package = "LatSquare")

dat <- openxlsx::read.xlsx(file, sheet = "Kartoffeln")

res <- LQuad_df(
  data = dat,
  block_col = "Block",
  column_col = "Saeule",
  treatment_col = "VNr",
  response_cols = "ParzErtrag_in_kg"
)

res