Last updated on 2021-05-27 12:54:31 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 4.3.0 | 37.11 | 369.08 | 406.19 | ERROR | |
r-devel-linux-x86_64-debian-gcc | 4.3.0 | 30.81 | 251.94 | 282.75 | ERROR | |
r-devel-linux-x86_64-fedora-clang | 4.3.0 | 488.10 | ERROR | |||
r-devel-linux-x86_64-fedora-gcc | 4.3.0 | 480.38 | ERROR | |||
r-devel-windows-x86_64 | 4.3.0 | 60.00 | 385.00 | 445.00 | NOTE | |
r-devel-windows-x86_64-gcc10-UCRT | 4.3.0 | OK | ||||
r-patched-linux-x86_64 | 4.3.0 | 58.62 | 327.21 | 385.83 | OK | |
r-release-linux-x86_64 | 4.3.0 | 36.63 | 328.15 | 364.78 | OK | |
r-release-windows-ix86+x86_64 | 4.3.0 | 49.00 | 399.00 | 448.00 | NOTE | |
r-oldrel-macos-x86_64 | 4.3.0 | NOTE | ||||
r-oldrel-windows-ix86+x86_64 | 4.3.0 | 45.00 | 357.00 | 402.00 | NOTE |
Version: 4.3.0
Check: examples
Result: ERROR
Running examples in 'umx-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: xmu_make_TwinSuperModel
> ### Title: Helper to make a basic top, MZ, and DZ model.
> ### Aliases: xmu_make_TwinSuperModel
>
> ### ** Examples
>
> # ==============
> # = Continuous =
> # ==============
> library(umx)
> data(twinData)
> twinData = umx_scale(twinData, varsToScale= c('ht1','ht2'))
> mzData = twinData[twinData$zygosity %in% "MZFF",]
> dzData = twinData[twinData$zygosity %in% "DZFF",]
> m1= xmu_make_TwinSuperModel(mzData=mzData, dzData=dzData, selDVs=c("wt","ht"), sep="", nSib=2)
> names(m1) # "top" "MZ" "DZ"
[1] "top" "MZ" "DZ" "fitfunction" "name"
[6] "matrices" "algebras" "constraints" "data" "submodels"
[11] "output" "compute" "options" "intervals" "manifestVars"
[16] "latentVars"
> class(m1$MZ$fitfunction)[[1]] == "MxFitFunctionML"
[1] TRUE
>
> # ====================
> # = With a covariate =
> # ====================
>
> m1= xmu_make_TwinSuperModel(mzData=mzData, dzData=dzData,
+ selDVs= "wt", selCovs= "age", sep="", nSib=2)
1 row(s) dropped from 'data' due to missing definition variable(s)
> m1$top$intercept$labels
wt1 wt2
means "intercept_wt1" "intercept_wt1"
> m1$MZ$expMean
mxAlgebra 'expMean'
$formula: top.intercept + cbind(T1DefVars %*% top.meansBetas, T2DefVars %*% top.meansBetas)
$result: (not yet computed) <0 x 0 matrix>
dimnames:
[[1]]
[1] "means"
[[2]]
[1] "wt1" "wt2"
>
> # ===============
> # = WLS example =
> # ===============
> m1=xmu_make_TwinSuperModel(mzData=mzData, dzData=dzData,selDVs=c("wt","ht"),sep="",type="WLS")
Data treated as WLS
> class(m1$MZ$fitfunction)[[1]] == "MxFitFunctionWLS"
[1] TRUE
> m1$MZ$fitfunction$type =="WLS"
[1] TRUE
> # Check default all-continuous method
> m1$MZ$fitfunction$continuousType == "cumulants"
[1] TRUE
>
> # Choose non-default type (DWLS)
> m1= xmu_make_TwinSuperModel(mzData= mzData, dzData= dzData,
+ selDVs= c("wt","ht"), sep="", type="DWLS")
Data treated as DWLS
> m1$MZ$fitfunction$type =="DWLS"
[1] TRUE
> class(m1$MZ$fitfunction)[[1]] == "MxFitFunctionWLS"
[1] TRUE
>
> # Switch WLS method
> m1 = xmu_make_TwinSuperModel(mzData= mzData, dzData= dzData, selDVs= c("wt","ht"), sep= "",
+ type = "WLS", allContinuousMethod = "marginals")
Data treated as WLS
> m1$MZ$fitfunction$continuousType == "marginals"
[1] TRUE
> class(m1$MZ$fitfunction)[[1]] == "MxFitFunctionWLS"
[1] TRUE
>
>
> # ============================================
> # = Bivariate continuous and ordinal example =
> # ============================================
> data(twinData)
> selDVs = c("wt", "obese")
> # Cut BMI column to form ordinal obesity variables
> ordDVs = c("obese1", "obese2")
> obesityLevels = c('normal', 'overweight', 'obese')
> cutPoints = quantile(twinData[, "bmi1"], probs = c(.5, .2), na.rm = TRUE)
> twinData$obese1 = cut(twinData$bmi1, breaks = c(-Inf, cutPoints, Inf), labels = obesityLevels)
> twinData$obese2 = cut(twinData$bmi2, breaks = c(-Inf, cutPoints, Inf), labels = obesityLevels)
> # Make the ordinal variables into mxFactors (ensure ordered is TRUE, and require levels)
> twinData[, ordDVs] = umxFactor(twinData[, ordDVs])
> mzData = twinData[twinData$zygosity %in% "MZFF",]
> dzData = twinData[twinData$zygosity %in% "DZFF",]
> m1 = xmu_make_TwinSuperModel(mzData= mzData, dzData= dzData, selDVs= selDVs, sep="", nSib= 2)
Found 1 pair(s) of ordinal variables:'obese1' and 'obese2' (No binary)
1 pair(s) of continuous variables:'wt1'
Polite note: please use fullVarNames instead of selDVs when calling umxThresholdMatrix
> names(m1) # "top" "MZ" "DZ"
[1] "top" "MZ" "DZ" "fitfunction" "name"
[6] "matrices" "algebras" "constraints" "data" "submodels"
[11] "output" "compute" "options" "intervals" "manifestVars"
[16] "latentVars"
>
> # ==============
> # = One binary =
> # ==============
> data(twinData)
> cutPoints = quantile(twinData[, "bmi1"], probs = .2, na.rm = TRUE)
> obesityLevels = c('normal', 'obese')
> twinData$obese1 = cut(twinData$bmi1, breaks = c(-Inf, cutPoints, Inf), labels = obesityLevels)
> twinData$obese2 = cut(twinData$bmi2, breaks = c(-Inf, cutPoints, Inf), labels = obesityLevels)
> ordDVs = c("obese1", "obese2")
> twinData[, ordDVs] = umxFactor(twinData[, ordDVs])
> selDVs = c("wt", "obese")
> mzData = twinData[twinData$zygosity %in% "MZFF",]
> dzData = twinData[twinData$zygosity %in% "DZFF",]
> m1 = xmu_make_TwinSuperModel(mzData= mzData, dzData= dzData, selDVs= selDVs, sep= "", nSib= 2)
Found 1 pairs of binary variables:'obese1' and 'obese2'
I am fixing the latent means and variances of these variables to 0 and 1
and 1 pairs of continuous variables:'wt1'
Polite note: please use fullVarNames instead of selDVs when calling umxThresholdMatrix
Error in matrix(labels, nrow, ncol, byrow = byrow) :
data length differs from size of matrix: [2 != 1 x 1]
Calls: xmu_make_TwinSuperModel ... mxMatrix -> imxCreateMatrix -> imxCreateMatrix -> matrix
Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Version: 4.3.0
Check: installed package size
Result: NOTE
installed size is 5.4Mb
sub-directories of 1Mb or more:
help 4.0Mb
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-windows-x86_64, r-release-windows-ix86+x86_64, r-oldrel-macos-x86_64, r-oldrel-windows-ix86+x86_64
Version: 4.3.0
Check: Rd cross-references
Result: NOTE
Undeclared package ‘sem’ in Rd xrefs
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 4.3.0
Check: examples
Result: ERROR
Running examples in ‘umx-Ex.R’ failed
The error most likely occurred in:
> ### Name: xmu_make_TwinSuperModel
> ### Title: Helper to make a basic top, MZ, and DZ model.
> ### Aliases: xmu_make_TwinSuperModel
>
> ### ** Examples
>
> # ==============
> # = Continuous =
> # ==============
> library(umx)
> data(twinData)
> twinData = umx_scale(twinData, varsToScale= c('ht1','ht2'))
> mzData = twinData[twinData$zygosity %in% "MZFF",]
> dzData = twinData[twinData$zygosity %in% "DZFF",]
> m1= xmu_make_TwinSuperModel(mzData=mzData, dzData=dzData, selDVs=c("wt","ht"), sep="", nSib=2)
> names(m1) # "top" "MZ" "DZ"
[1] "top" "MZ" "DZ" "fitfunction" "name"
[6] "matrices" "algebras" "constraints" "data" "submodels"
[11] "output" "compute" "options" "intervals" "manifestVars"
[16] "latentVars"
> class(m1$MZ$fitfunction)[[1]] == "MxFitFunctionML"
[1] TRUE
>
> # ====================
> # = With a covariate =
> # ====================
>
> m1= xmu_make_TwinSuperModel(mzData=mzData, dzData=dzData,
+ selDVs= "wt", selCovs= "age", sep="", nSib=2)
1 row(s) dropped from 'data' due to missing definition variable(s)
> m1$top$intercept$labels
wt1 wt2
means "intercept_wt1" "intercept_wt1"
> m1$MZ$expMean
mxAlgebra 'expMean'
$formula: top.intercept + cbind(T1DefVars %*% top.meansBetas, T2DefVars %*% top.meansBetas)
$result: (not yet computed) <0 x 0 matrix>
dimnames:
[[1]]
[1] "means"
[[2]]
[1] "wt1" "wt2"
>
> # ===============
> # = WLS example =
> # ===============
> m1=xmu_make_TwinSuperModel(mzData=mzData, dzData=dzData,selDVs=c("wt","ht"),sep="",type="WLS")
Data treated as WLS
> class(m1$MZ$fitfunction)[[1]] == "MxFitFunctionWLS"
[1] TRUE
> m1$MZ$fitfunction$type =="WLS"
[1] TRUE
> # Check default all-continuous method
> m1$MZ$fitfunction$continuousType == "cumulants"
[1] TRUE
>
> # Choose non-default type (DWLS)
> m1= xmu_make_TwinSuperModel(mzData= mzData, dzData= dzData,
+ selDVs= c("wt","ht"), sep="", type="DWLS")
Data treated as DWLS
> m1$MZ$fitfunction$type =="DWLS"
[1] TRUE
> class(m1$MZ$fitfunction)[[1]] == "MxFitFunctionWLS"
[1] TRUE
>
> # Switch WLS method
> m1 = xmu_make_TwinSuperModel(mzData= mzData, dzData= dzData, selDVs= c("wt","ht"), sep= "",
+ type = "WLS", allContinuousMethod = "marginals")
Data treated as WLS
> m1$MZ$fitfunction$continuousType == "marginals"
[1] TRUE
> class(m1$MZ$fitfunction)[[1]] == "MxFitFunctionWLS"
[1] TRUE
>
>
> # ============================================
> # = Bivariate continuous and ordinal example =
> # ============================================
> data(twinData)
> selDVs = c("wt", "obese")
> # Cut BMI column to form ordinal obesity variables
> ordDVs = c("obese1", "obese2")
> obesityLevels = c('normal', 'overweight', 'obese')
> cutPoints = quantile(twinData[, "bmi1"], probs = c(.5, .2), na.rm = TRUE)
> twinData$obese1 = cut(twinData$bmi1, breaks = c(-Inf, cutPoints, Inf), labels = obesityLevels)
> twinData$obese2 = cut(twinData$bmi2, breaks = c(-Inf, cutPoints, Inf), labels = obesityLevels)
> # Make the ordinal variables into mxFactors (ensure ordered is TRUE, and require levels)
> twinData[, ordDVs] = umxFactor(twinData[, ordDVs])
> mzData = twinData[twinData$zygosity %in% "MZFF",]
> dzData = twinData[twinData$zygosity %in% "DZFF",]
> m1 = xmu_make_TwinSuperModel(mzData= mzData, dzData= dzData, selDVs= selDVs, sep="", nSib= 2)
Found 1 pair(s) of ordinal variables:'obese1' and 'obese2' (No binary)
1 pair(s) of continuous variables:'wt1'
Polite note: please use fullVarNames instead of selDVs when calling umxThresholdMatrix
> names(m1) # "top" "MZ" "DZ"
[1] "top" "MZ" "DZ" "fitfunction" "name"
[6] "matrices" "algebras" "constraints" "data" "submodels"
[11] "output" "compute" "options" "intervals" "manifestVars"
[16] "latentVars"
>
> # ==============
> # = One binary =
> # ==============
> data(twinData)
> cutPoints = quantile(twinData[, "bmi1"], probs = .2, na.rm = TRUE)
> obesityLevels = c('normal', 'obese')
> twinData$obese1 = cut(twinData$bmi1, breaks = c(-Inf, cutPoints, Inf), labels = obesityLevels)
> twinData$obese2 = cut(twinData$bmi2, breaks = c(-Inf, cutPoints, Inf), labels = obesityLevels)
> ordDVs = c("obese1", "obese2")
> twinData[, ordDVs] = umxFactor(twinData[, ordDVs])
> selDVs = c("wt", "obese")
> mzData = twinData[twinData$zygosity %in% "MZFF",]
> dzData = twinData[twinData$zygosity %in% "DZFF",]
> m1 = xmu_make_TwinSuperModel(mzData= mzData, dzData= dzData, selDVs= selDVs, sep= "", nSib= 2)
Found 1 pairs of binary variables:'obese1' and 'obese2'
I am fixing the latent means and variances of these variables to 0 and 1
and 1 pairs of continuous variables:'wt1'
Polite note: please use fullVarNames instead of selDVs when calling umxThresholdMatrix
Error in matrix(labels, nrow, ncol, byrow = byrow) :
data length differs from size of matrix: [2 != 1 x 1]
Calls: xmu_make_TwinSuperModel ... mxMatrix -> imxCreateMatrix -> imxCreateMatrix -> matrix
Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc