debias_plsmm | R Documentation |

This function debias the lasso coefficients estimated from the `plsmm_lasso`

function
and computes p-values.

```
debias_plsmm(x, y, series, plsmm_output, a = 1, Z = NULL)
```

`x` |
A matrix of predictor variables. |

`y` |
A continuous vector of response variable. |

`series` |
A variable representing different series or groups in the data modeled as a random intercept. |

`plsmm_output` |
Output object obtained from the |

`a` |
A scalar that adjusts the variance of the random intercept |

`Z` |
(Optional) Pre-computed correction score matrix. If provided, it will be used directly for debiasing. |

The original data is decorrelated, and a correction score matrix is computed. The correction scores are a measure of correlation between the predictors in the data. The debiasing process utilizes these scores to compute debiased estimates of the coefficients, along with associated p-values.

A data frame containing debiased coefficients, standard errors, confidence intervals, and p-values.

```
set.seed(123)
data_sim = simulate_group_inter(N = 50, n_mvnorm = 3, grouped = TRUE,
timepoints = 3:5, nonpara_inter = TRUE,
sample_from = seq(0,52,13),
cos = FALSE, A_vec = c(1, 1.5))
sim = data_sim$sim
x = as.matrix(sim[,-1:-3])
y = sim$y
series = sim$series
t = sim$t
bases = create_bases(t)
lambda <- 0.0046
gamma <- 0.00000001
plsmm_output <- plsmm_lasso(x, y, series, t,
name_group_var = "group", bases$bases,
gamma = gamma, lambda = lambda, timexgroup = TRUE,
criterion = "BIC"
)
debias_plsmm(x, y, series, plsmm_output)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.