## File Name: gdina_designmatrices_create_Aj.R
## File Version: 0.12
#**** design matrices for GDINA model
gdina_designmatrices_create_Aj <- function(nq)
{
Aj <- NULL
if (nq==1){ Aj <- matrix( c(0,1), ncol=1 ) }
if (nq==2){
Aj <- matrix( c( 0, 0,
1, 0,
0, 1,
1, 1 ), byrow=TRUE, ncol=2 )
}
if (nq==3){
Aj <- matrix( c( 0, 0, 0,
1, 0, 0, 0, 1, 0, 0, 0, 1,
1, 1, 0, 1, 0, 1, 0, 1, 1,
1, 1, 1 ), byrow=TRUE, ncol=3 )
}
if (nq==4){
Aj <- matrix( c( 0, 0, 0, 0,
1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,1,
1,1,0,0, 1,0,1,0, 1,0,0,1, 0,1,1,0, 0,1,0,1, 0,0,1,1,
1,1,1,0, 1,0,1,1, 1,1,0,1, 0,1,1,1,
1, 1, 1,1), byrow=TRUE, ncol=4 )
}
if (nq==5){
Aj <- matrix( c( 0,0,0,0,0,
1,0,0,0,0,
0,1,0,0,0,
0,0,1,0,0,
0,0,0,1,0,
0,0,0,0,1,
1,1,0,0,0,
1,0,1,0,0,
1,0,0,1,0,
1,0,0,0,1,
0,1,1,0,0,
0,1,0,1,0,
0,1,0,0,1,
0,0,1,1,0,
0,0,1,0,1,
0,0,0,1,1,
1,1,1,0,0,
1,1,0,1,0,
1,1,0,0,1,
1,0,1,1,0,
1,0,1,0,1,
1,0,0,1,1,
0,1,1,1,0,
0,1,1,0,1,
0,1,0,1,1,
0,0,1,1,1,
1,1,1,1,0,
1,1,1,0,1,
1,1,0,1,1,
1,0,1,1,1,
0,1,1,1,1,
1,1,1,1,1 ), byrow=TRUE, ncol=5 )
}
if ( nq > 5){
Aj <- gdina_designmatrices_create_Aj_general(nq)
}
return(Aj)
}
.create.Aj <- gdina_designmatrices_create_Aj
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.