ssf_ind: Apply a list of SSF candidate models to multiple individuals

View source: R/fcts RSF.R

ssf_indR Documentation

Apply a list of SSF candidate models to multiple individuals

Description

Apply ssf_mod to each individual of a dataset

Usage

ssf_ind(id, data, form_ls, cleanModel = F, method = "approximate")

Arguments

id

A vector indicating the individuals

data

The dataset containing all data

form_ls

A list of formulas for the different candidate models

cleanModel

Whether the model should be "cleaned" to save memory space (default = F)

method

Whether exact or approximate ML should be performed (see package survival)

Value

A list of of coxph objects

Examples

data(deer)
deer$log_sl<-log(deer$step_length)
ls2<-list()
ls2[[1]]<-as.formula(STATUS~forest+hummod+log_sl+strata(STRATA))
ls2[[2]]<-as.formula(STATUS~forest+log_sl+strata(STRATA))
out<-ssf_ind(deer$ID, data=deer, form_ls=ls2)

BastilleRousseau/IndRSA documentation built on July 1, 2024, 7:48 a.m.