This function is used to update A matrix
Aupdate(Dfix, Gamma, Adata, R, p, q, I, iniA, eps, refA)the coefficient matrix for study covariates
the G matrix value
the dataset
the rank of reduced rank model
the number of covariates in the dimension reduction
the numbne of study covariates
a U by U incidence matrix with elements; I(i,j)=1 if state j can be accessed from state i in one step and 0 otherwise
initial value for the iteration
the tolerance for convergence, default is 10^-5
a vector of reference categories
a list of outputs:
NewA: the updated A matrix
loglikeA: the loglikelihood when updating A