Description Usage Format Examples
Three subjects with two replications = 6 ellipses created by mel. All 6 ellipses are centered around the origin with a phase angle of pi/2 and
differ by subject in terms of their retention (0.4,0.8,0.4) and b.x saturation point (0.6,0.6,1).
Errors in both the input and the output are given a standard deviation of 0.1 for all ellipses. Used in the help page for fel.repeated
.
1 |
A data frame with 144 observations on the following 4 variables.
X
a numeric vector
Y
a numeric vector
subjects
subject, one of "A", "B", or "C".
repeated
which ellipse for subject. Either 1 or 2.
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 | ## Data is created using the following code
set.seed(1)
ellip1 <- mel(method = 2, retention = 0.4, b.x = 0.6, b.y = 0.8, cx = 0, cy = 0,
sd.x = 0.1, sd.y = 0.1, period = 24, n.points = 48, phase.angle = pi/2)
ellip2 <- mel(method = 2, retention = 0.8, b.x = 0.6, b.y = 0.8, cx = 0, cy = 0,
sd.x = 0.1, sd.y = 0.1, period = 24, n.points = 48, phase.angle = pi/2)
ellip3 <- mel(method = 2, retention = 0.4, b.x = 1, b.y = 0.8, cx = 0, cy = 0,
sd.x = 0.1, sd.y = 0.1, period = 24, n.points = 48, phase.angle = pi/2)
X <- c(ellip1$x, ellip2$x, ellip3$x)
Y <- c(ellip1$y, ellip2$y, ellip3$y)
subjects <- c(rep("A", length(ellip1$x)), rep("B", length(ellip2$x)), rep("C",
length(ellip3$x)))
repeated <- rep(c(1,2),each=24,times=3)
##Use data file to fit 6 ellipses.
data(EllipseData)
six.models <- fel.repeated(EllipseData$X, EllipseData$Y, method = "harmonic2",
subjects = EllipseData$subjects,repeated=EllipseData$repeated)
six.models
#Model fit for B-1
six.models$models["B",1]
par(mfrow=c(2,3))
plot(six.models,xlab="X input",ylab="Y output")
par(mfrow=c(1,1))
|
Loading required package: car
Loading required package: carData
Loading required package: msm
Loading required package: MASS
Call:
fel(x = x, y = y, method = "harmonic2", subjects = subjects2,
subset = subset)
Parameter Estimates:
subjects repeated b.x b.y phase.angle cx cy
1 A 1 0.5736708 0.7912104 -4.695827 -0.020697918 -0.019671309
2 B 1 0.5502696 0.8478535 1.522854 0.018284077 -0.007561673
3 C 1 0.9989673 0.8180595 -4.676999 -0.004129446 -0.015904305
4 A 2 0.5926083 0.8083487 -4.661392 -0.010540786 -0.016880005
5 B 2 0.5961080 0.7700083 -4.668501 0.033268300 0.025867810
6 C 2 0.9935576 0.8126730 -4.711277 0.029901050 0.026175462
retention coercion area lag split.angle hysteresis.x hysteresis.y
1 0.3762420 0.2463602 0.6780785 1.695490 54.05583 0.4294452 0.4755272
2 0.8171985 0.3818710 1.4127098 2.929684 57.01583 0.6939708 0.9638440
3 0.4144164 0.4514399 1.3005830 1.791072 39.31422 0.4519066 0.5065847
4 0.4272710 0.2769307 0.7954650 1.857314 53.75449 0.4673082 0.5285727
5 0.8502358 0.4418421 1.5922607 3.188982 52.25447 0.7412116 1.1041904
6 0.3679489 0.4098001 1.1484985 1.623953 39.28119 0.4124574 0.4527638
ampx ampy rote.deg rote.rad semi.major semi.minor focus.x
1 0.5736708 0.8761118 57.89057 1.0103811 1.025867 0.2103967 0.5336960
2 0.5502696 1.1775691 69.63757 1.2154049 1.248931 0.3600515 0.4161244
3 0.9989673 0.9170399 42.25702 0.7375241 1.319251 0.3138056 0.9483996
4 0.5926083 0.9143238 58.42020 1.0196249 1.063230 0.2381463 0.5426518
5 0.5961080 1.1470892 68.14732 1.1893951 1.224701 0.4138415 0.4290453
6 0.9935576 0.8920896 41.62150 0.7264323 1.305594 0.2800093 0.9532846
focus.y eccentricity
1 0.8504735 0.9787428
2 1.1211743 0.9575438
3 0.8616776 0.9712979
4 0.8827652 0.9745929
5 1.0698359 0.9411776
6 0.8470057 0.9767308
Delta Method Standard Errors:
subjects repeated b.x b.y phase.angle cx cy retention
1 A 1 0.03591 0.03035 0.06259 0.02539 0.02146 0.03035
2 B 1 0.02605 0.02935 0.04733 0.01842 0.02075 0.02935
3 C 1 0.02949 0.02961 0.02952 0.02085 0.02093 0.02961
4 A 2 0.02640 0.02487 0.04455 0.01867 0.01759 0.02487
5 B 2 0.02060 0.02373 0.03456 0.01457 0.01678 0.02373
6 C 2 0.02933 0.02873 0.02952 0.02074 0.02032 0.02873
coercion area lag split.angle ampx ampy rote.deg
1 0.02366 0.06923 0.13231 0.03489 0.03591 0.03035 3.291
2 0.02060 0.08394 0.09519 0.02678 0.02605 0.02935 1.440
3 0.03171 0.10053 0.12331 0.02289 0.02949 0.02961 2.554
4 0.01885 0.05831 0.10391 0.02582 0.02640 0.02487 2.200
5 0.01737 0.07073 0.07901 0.02241 0.02060 0.02373 1.107
6 0.03156 0.09587 0.12302 0.02257 0.02933 0.02873 2.929
[[1]]
Call:
FUN(x = data[x, , drop = FALSE], method = ..1, period = ..2,
times = ..3, na.action = ..4, control = ..5)
Delta Method Standard Errors and 95% C.I.'s:
Estimates S.E. low high
b.x 0.550270 0.02605 0.49555 0.60499
b.y 0.847854 0.02935 0.78620 0.90951
phase.angle 1.522854 0.04733 1.42341 1.62230
cx 0.018284 0.01842 -0.02041 0.05698
cy -0.007562 0.02075 -0.05116 0.03603
retention 0.817199 0.02935 0.75554 0.87885
coercion 0.381871 0.02060 0.33860 0.42514
area 1.412710 0.08394 1.23637 1.58905
lag 2.929684 0.09519 2.72970 3.12967
split.angle 57.015828 0.02678 56.95957 57.07209
ampx 0.550270 0.02605 0.49555 0.60499
ampy 1.177569 0.02935 1.11592 1.23922
rote.deg 69.637569 1.43951 66.61326 72.66188
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.