Skip to contents

Fits a linear model for spatial transcriptomics data using deconvolution and fixed coefficients.

Usage

spot_lm(y, X, lambda, big_X = NULL, fix_coef = NULL, beta_0 = NULL)

Arguments

y

Response vector.

X

Covariate matrix (spots × covariates).

lambda

Deconvolution matrix (spots × cell types).

big_X

Optional full design matrix (covariates × cell types).

fix_coef

Logical matrix specifying which coefficients to fix.

beta_0

Initial coefficients.

Value

A list with:

beta

Estimated coefficients.

vcov

Variance-covariance matrix.

standard_error_matrix

Standard error matrix.

sigma.sq

Residual variance estimate.