1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
|
#' @keywords internal
"_PACKAGE"
##' Estimation and simulation of latent variable models
##'
##' A general implementation of Structural Equation Models wth latent variables
##' (MLE, 2SLS, and composite likelihood estimators) with both continuous,
##' censored, and ordinal outcomes (Holst and Budtz-Joergensen (2013)
##' <doi:10.1007/s00180-012-0344-y>). Mixture latent variable models and
##' non-linear latent variable models (Holst and Budtz-Joergensen (2020)
##' <doi:10.1093/biostatistics/kxy082>). The package also provides methods for
##' graph exploration (d-separation, back-door criterion), simulation of general
##' non-linear latent variable models, and estimation of influence functions for
##' a broad range of statistical models.
##' @name lava-package
##' @importFrom graphics plot lines points abline points text layout
##' par plot.new plot.window title rect locator segments image
##' mtext box axis polygon matplot contour contour.default
##' identify rug curve
##' @importFrom grDevices xy.coords col2rgb rgb colors rainbow
##' topo.colors gray.colors palette colorRampPalette heat.colors
##' @importFrom utils stack combn read.csv getTxtProgressBar
##' setTxtProgressBar txtProgressBar head tail modifyList
##' getFromNamespace write.table methods data
##' glob2rx
##' @importFrom stats density deriv effects lm family simulate vcov
##' var cov cor coef model.frame model.weights as.formula
##' model.matrix rnorm rchisq runif rlnorm pnorm qnorm na.omit AIC
##' terms logLik qt pt update update.formula confint approxfun
##' pchisq confint.default formula fft uniroot rbinom predict sd
##' addmargins residuals dnorm quantile qf cov2cor qchisq
##' get_all_vars p.adjust rpois rt rmultinom rgamma printCoefmat
##' glm nlminb na.pass na.omit influence weights density.default
##' @importFrom survival is.Surv
##' @importFrom future.apply future_mapply future_lapply
##' @importFrom methods new as
##' @aliases lava-package lava
##' @author Klaus K. Holst Maintainer: <klaus@@holst.it>
##' @keywords package
##' @examples
##'
##' lava()
##'
NULL
##' Longitudinal Bone Mineral Density Data
##'
##' Bone Mineral Density Data consisting of 112 girls randomized to receive
##' calcium og placebo. Longitudinal measurements of bone mineral density
##' (g/cm^2) measured approximately every 6th month in 3 years.
##'
##'
##' @name calcium
##' @docType data
##' @format A data.frame containing 560 (incomplete) observations. The 'person'
##' column defines the individual girls of the study with measurements at
##' visiting times 'visit', and age in years 'age' at the time of visit. The
##' bone mineral density variable is 'bmd' (g/cm^2).
##' @source Vonesh & Chinchilli (1997), Table 5.4.1 on page 228.
##' @keywords datasets
NULL
##' Longitudinal Bone Mineral Density Data (Wide format)
##'
##' Bone Mineral Density Data consisting of 112 girls randomized to receive
##' calcium og placebo. Longitudinal measurements of bone mineral density
##' (g/cm^2) measured approximately every 6th month in 3 years.
##' @name bmd
##' @docType data
##' @source Vonesh & Chinchilli (1997), Table 5.4.1 on page 228.
##' @format data.frame
##' @keywords datasets
##' @seealso calcium
NULL
##' Simulated data
##'
##' Simulated data
##' @name brisa
##' @docType data
##' @format data.frame
##' @source Simulated
##' @keywords datasets
NULL
##' Data
##'
##' Description
##' @name bmidata
##' @docType data
##' @format data.frame
##' @keywords datasets
NULL
##' Hubble data
##'
##' Velocity (v) and distance (D) measures of 36 Type Ia super-novae from the Hubble
##' Space Telescope
##' @name hubble
##' @docType data
##' @format data.frame
##' @source Freedman, W. L., et al. 2001, AstroPhysicalJournal, 553, 47.
##' @keywords datasets
NULL
##' Hubble data
##'
##' @name hubble2
##' @seealso hubble
##' @docType data
##' @format data.frame
##' @keywords datasets
NULL
##' Data
##'
##' Description
##' @name indoorenv
##' @docType data
##' @format data.frame
##' @source Simulated
##' @keywords datasets
NULL
##' Missing data example
##'
##' Simulated data generated from model
##' \deqn{E(Y_i\mid X) = X, \quad cov(Y_1,Y_2\mid X)=0.5}
##'
##' The list contains four data sets
##' 1) Complete data
##' 2) MCAR
##' 3) MAR
##' 4) MNAR (missing mechanism depends on variable V correlated with Y1,Y2)
##' @examples
##' data(missingdata)
##' e0 <- estimate(lvm(c(y1,y2)~b*x,y1~~y2),missingdata[[1]]) ## No missing
##' e1 <- estimate(lvm(c(y1,y2)~b*x,y1~~y2),missingdata[[2]]) ## CC (MCAR)
##' e2 <- estimate(lvm(c(y1,y2)~b*x,y1~~y2),missingdata[[2]],missing=TRUE) ## MCAR
##' e3 <- estimate(lvm(c(y1,y2)~b*x,y1~~y2),missingdata[[3]]) ## CC (MAR)
##' e4 <- estimate(lvm(c(y1,y2)~b*x,y1~~y2),missingdata[[3]],missing=TRUE) ## MAR
##' @name missingdata
##' @docType data
##' @format list of data.frames
##' @source Simulated
##' @keywords datasets
NULL
##' Example data (nonlinear model)
##'
##' @name nldata
##' @docType data
##' @format data.frame
##' @source Simulated
##' @keywords datasets
NULL
##' Example SEM data (nonlinear)
##'
##' Simulated data
##' @name nsem
##' @docType data
##' @format data.frame
##' @source Simulated
##' @keywords datasets
NULL
##' Example SEM data
##'
##' Simulated data
##' @name semdata
##' @docType data
##' @source Simulated
##' @format data.frame
##' @keywords datasets
NULL
##' Serotonin data
##'
##' This simulated data mimics a PET imaging study where the 5-HT2A
##' receptor and serotonin transporter (SERT) binding potential has
##' been quantified into 8 different regions. The 5-HT2A
##' cortical regions are considered high-binding regions
## 'which are a priori known to yield quite similar and highly correlated
##' measurements. These measurements can be regarded as proxy measures of
##' the extra-cellular levels of serotonin in the brain
##' \tabular{rll}{
##' day \tab numeric \tab Scan day of the year \cr
##' age \tab numeric \tab Age at baseline scan \cr
##' mem \tab numeric \tab Memory performance score \cr
##' depr \tab numeric \tab Depression (mild) status 500 days after baseline \cr
##' gene1 \tab numeric \tab Gene marker 1 (HTR2A) \cr
##' gene2 \tab numeric \tab Gene marker 2 (HTTTLPR) \cr
##' cau \tab numeric \tab SERT binding, Caudate Nucleus \cr
##' th \tab numeric \tab SERT binding, Thalamus \cr
##' put \tab numeric \tab SERT binding, Putamen \cr
##' mid \tab numeric \tab SERT binding, Midbrain \cr
##' aci \tab numeric \tab 5-HT2A binding, Anterior cingulate gyrus \cr
##' pci \tab numeric \tab 5-HT2A binding, Posterior cingulate gyrus \cr
##' sfc \tab numeric \tab 5-HT2A binding, Superior frontal cortex \cr
##' par \tab numeric \tab 5-HT2A binding, Parietal cortex \cr
##' }
##' @name serotonin
##' @docType data
##' @format data.frame
##' @source Simulated
##' @keywords datasets
NULL
##' Data
##'
##' Description
##' @seealso serotonin
##' @name serotonin2
##' @docType data
##' @format data.frame
##' @source Simulated
##' @keywords datasets
NULL
##' Twin menarche data
##'
##' Simulated data
##' \tabular{rll}{
##' id \tab numeric \tab Twin-pair id \cr
##' zyg \tab character \tab Zygosity (MZ or DZ) \cr
##' twinnum \tab numeric \tab Twin number (1 or 2) \cr
##' agemena \tab numeric \tab Age at menarche (or censoring) \cr
##' status \tab logical \tab Censoring status (observed:=T,censored:=F) \cr
##' bw \tab numeric \tab Birth weight \cr
##' msmoke \tab numeric \tab Did mother smoke? (yes:=1,no:=0) \cr
##' }
##' @name twindata
##' @docType data
##' @format data.frame
##' @keywords datasets
##' @source Simulated
NULL
##' For internal use
##'
##' @title For internal use
##' @name startvalues
##' @rdname internal
##' @author Klaus K. Holst
##' @keywords utilities
##' @export
##' @aliases
##' startvalues0 startvalues1 startvalues2 startvalues3
##' starter.multigroup
##' addattr modelPar modelVar matrices pars pars.lvm
##' pars.lvmfit pars.glm score.glm procdata.lvmfit modelPar modelVar
##' mat.lvm matrices reorderdata graph2lvm igraph.lvm subgraph finalize
##' index.lvm index.lvmfit index reindex index<-
##' rmvn0 dmvn0 logit expit tigol
##' randomslope randomslope<- lisrel variances offdiags describecoef
##' parlabels rsq stdcoef CoefMat CoefMat.multigroupfit deriv updatelvm
##' checkmultigroup profci estimate.MAR missingModel Inverse Identical
##' gaussian_logLik.lvm addhook gethook multigroup Weights fixsome
##' parfix parfix<- merge IV parameter index index<-
##' Specials procformula getoutcome decomp.specials
##' na.pass0
NULL
|