Coerce an Object of Class simculta
to a Data Frame
Source: R/manCULTA-method-simculta.R
as.data.frame.simculta.Rd
Coerce an Object of Class simculta
to a Data Frame
Usage
# S3 method for class 'simculta'
as.data.frame(x, ...)
Examples
x <- GenCULTA2Profiles(
n = 10,
m = 6,
common_trait_loading = matrix(
data = c(1, 1.25, 1.50, 1.75),
ncol = 1
),
common_state_loading = matrix(
data = c(1, 1.5, 1.75, 2.00),
ncol = 1
),
mu_t = NULL,
psi_t = NULL,
mu_p = NULL,
psi_p = NULL,
theta = diag(4),
mu_profile = cbind(
c(-3, -3, -3, -3),
c(3, 3, 3, 3)
),
mu_x = 0,
sigma_x = 1,
nu_0 = -3.563,
kappa_0 = 0.122,
alpha_0 = -3.586,
beta_00 = 2.250,
gamma_00 = 0.063,
gamma_10 = 0.094,
phi_0 = 0.311,
phi_1 = 0,
psi_s0 = 0.151,
psi_s = 0.290
)
as.data.frame(x)
#> id covariate y1t0 y2t0 y3t0 y4t0 y1t1 y2t1
#> 1 1 0.48236947 1.3037647 3.321640 1.4157185 2.0901442 -0.1624484 4.914767
#> 2 2 0.99294364 0.6134074 2.033937 0.4115373 -1.5233829 1.8766862 3.848954
#> 3 3 -1.24639550 1.8860911 3.783625 4.7466582 3.9078727 3.6595498 1.915735
#> 4 4 -0.03348752 2.7039843 1.850319 1.0970003 -0.6784618 1.0769389 2.732426
#> 5 5 -0.07096218 3.6785650 3.973106 4.9584789 4.8689740 1.0197073 3.375581
#> 6 6 -0.75892065 3.4897155 4.715623 0.2789321 4.3518521 4.1372035 3.157064
#> 7 7 -1.03435936 4.0687524 2.778493 2.6382359 3.6560427 5.5575079 1.001928
#> 8 8 -0.63073195 0.8762377 2.592222 3.5173125 5.2557097 4.2446516 2.934286
#> 9 9 0.58680772 3.2528660 3.823421 3.3640607 0.6556269 1.1302943 3.632701
#> 10 10 -0.41632266 4.6908315 4.077399 -0.5242746 4.8891399 3.6011488 3.238195
#> y3t1 y4t1 y1t2 y2t2 y3t2 y4t2
#> 1 1.8728673 2.4518803 -0.05928173 2.42710401 1.508709 3.66210920
#> 2 4.2386866 -0.1749965 0.33018688 1.67448740 1.182631 0.01188875
#> 3 2.4653823 4.3203500 4.18959333 3.54802775 3.675875 3.71485378
#> 4 1.6573379 0.1593718 0.90291184 -0.02053572 1.430704 -2.69862368
#> 5 2.3053974 1.8291057 3.32290593 3.92932071 2.509414 3.55344739
#> 6 0.8597136 0.4314219 4.11419694 3.92892988 -1.408554 2.09785772
#> 7 3.3805028 1.6221743 4.98999802 2.62657182 3.949717 1.07743739
#> 8 4.7343588 5.5661021 3.78550701 3.30847119 3.189293 5.17752797
#> 9 3.6122034 0.6572932 2.71851998 4.21385048 2.525594 0.29603227
#> 10 0.5960675 5.5820287 3.48645475 5.17815478 -1.061037 4.34753739
#> y1t3 y2t3 y3t3 y4t3 y1t4 y2t4 y3t4
#> 1 0.04804128 4.185201 0.4359512 2.936750 0.06712224 3.054091 -1.7019385
#> 2 2.18944758 3.177672 4.5125678 2.886079 -0.34838968 3.091939 4.3719742
#> 3 4.18116453 3.129946 5.7471608 3.766124 3.99771102 4.816850 4.7523398
#> 4 0.88646613 1.187530 2.6974376 -2.489749 1.56346077 1.914307 0.8060320
#> 5 2.20465682 2.116690 2.0168770 3.273221 4.88181496 6.550904 5.7361792
#> 6 5.11092000 2.816391 2.3093749 1.281790 3.36198360 2.493566 -0.1632555
#> 7 3.31400820 1.637620 4.1329813 1.595920 4.27240089 2.529805 2.4890848
#> 8 5.62103425 4.186820 2.4889671 3.882864 2.76659317 5.513407 3.6584438
#> 9 1.60030786 1.575915 1.3584923 1.150118 1.83195856 1.805917 3.7163146
#> 10 2.11679926 4.624255 -2.0168118 4.522281 2.88407735 5.632468 0.7221205
#> y4t4 y1t5 y2t5 y3t5 y4t5
#> 1 0.3243353 -0.4487972 2.618235 -0.4777822 0.007762294
#> 2 -0.3611470 0.2548806 2.664263 2.2858278 1.100689970
#> 3 4.9267074 4.0733216 1.695001 2.4577131 3.559312710
#> 4 -2.1592350 1.6517661 3.329703 4.1936780 1.180171757
#> 5 6.3887029 2.0077404 4.246073 4.1096125 4.772253420
#> 6 0.1199249 6.4632399 5.689978 1.2560223 3.417699189
#> 7 -0.9980008 4.6003590 4.240185 2.9498481 1.142447681
#> 8 5.9467400 1.1373319 3.510702 3.8197370 4.170018954
#> 9 1.0928269 2.3712507 1.882868 2.2044726 2.690283572
#> 10 5.7662610 4.6911152 6.334892 2.1012571 5.698960655