Description Usage Arguments Value Author(s) Examples
This function performs the multivariate regression between an array of shapes (2D or 3D) and a dependent variable or a matrix of independent variables. It also plot shapes predicted at low and high independent variable values. If the independent variable is univariate Canonical Correlation Analysis (with optional group-structure) is also displayed. Optionally, the heatmap on deformation between shapes predicted at low and high independent variable values is computed. The function saves also a sequence of shapes predicted at equally spaced values (20 by default) within the range of independent variable.
1 2 3 4 |
shapearray |
array: an array of shapes treated as dependent variable indep a vector representing the independent variable or a matrix of independent variables. In this latter case the shapes are predicted at low and high values of each variable present in the matrix. |
mag |
numeric: magnification parameter for deformation visualization |
frames |
numeric: number of shapes predicted at equally spaced values within the range of independent variable |
links |
numeric: links structure |
zlim |
numeric: range of heatmap color map for 2D visualization. |
colcca |
numeric: colors for points in CCA plot |
pchcca |
numeric: pch symbols in CCA plot |
lwd |
numeric: links width |
heatmap |
logical: if TRUE the 2D heatmap color is displayed |
triang |
list: for 3D data an optional triangulation structure that is used for computing heatmap in 3D |
group |
numeric: group structure to be visualized in CCA plot |
rampcolors |
character: color palette for heatmap |
alpha |
numeric: Transparency parameter for 3D visualization |
from |
numeric: Low range value for heatmap visualization in 3D |
to |
numeric: High range value for heatmap visualization in 3D |
legend |
character: legend for group structure |
predmin matrix: shape predicted at low values of independent variable(s)
predmax matrix: predicted at high values of independent variable(s)
seqshapes array: sequence of shapes predicted at equally spaced values within the range of independent variable(s)
myseq numeric vector: equally spaced values of independent variable(s) at which shapes are predicted
Paolo Piras
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 | ## Not run:
### only one plot
data(macrogroup)
data(my2d)
linksdors<-list(c(1,2),c(37,7),c(12,4),c(27,28),c(25,21),c(38,40),c(9,10),c(2,3),c(3,4),c(1,7),c(1,6),c(3,5),c(6,40),c(5,9),c(40,8),c(8,9),c(1,7),c(7,6),c(3,4),c(4,5),c(39,38),c(38,35),c(35,37),c(37,39),c(35,34),c(34,33),c(33,32),c(32,31),c(31,30),c(30,29),c(29,37),c(37,36),c(36,29),c(28,31),c(28,30),c(13,10),c(10,11),c(11,12),c(12,13),c(13,14),c(14,16),c(16,17),c(17,20),c(20,19),c(19,18),c(18,12),c(18,15),c(15,12),c(21,19),c(21,20),c(24,25),c(25,26),c(26,27),c(27,24),c(26,24),c(24,23),c(23,22),c(22,8),c(8,2))
amy2d<-procSym(my2d)
shapearray<-procSym(my2d,CSinit=T,scale=F)$orpdata#### prova cambiando CSinit per il size and shape space
indep<-amy2d$size
mag=1
frames=20
links=linksdors
col=1
lwd=2
group=macrogroup
shaperegr(shapearray,indep,links=links)
shaperegr(shapearray,indep,links=links,group=group,colcca=as.numeric(group))
shaperegr(shapearray,indep,links=links,group=group,heatmap=T)
## in 3 dimensions
data(pri3d)
data(sur_ent)
data(linksbase)
data(linksface)
data(linksentire)
data=pri3d
my3d<-centershapes(data)
amy3d<-procSym(my3d)
shapearray<-procSym(my3d,CSinit=T,scale=F)$orpdata####provacambiandoCSinitperilsizeandshapespace
indep<-amy3d$size
triang<-t(sur_ent$it)
group<-factor(substr(dimnames(amy3d$orpdata)[[3]],1,7))
shaperegr(shapearray,indep,links=linksentire)
shaperegr(shapearray,indep,links=linksentire,group=group,colcca=as.numeric(group),pchcca=as.numeric(group))
prov<-shaperegr(shapearray,indep,links=linksentire,group=group,heatmap=T,triang=triang)
prov2<-shaperegr(shapearray,cbind(amy3d$size,rnorm(length(indep),0,1)),links=linksentire,group=group,heatmap=T,triang=triang)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.