# MultiLogit Regression Problem

I’m attempting to run a MultiLogit model in RStan (using RStudio) following the code in section 1.6, page 18 of the Stan users Guide version 2.25. I’ve created some test data with two predictors (length and age. Ages range from 2 to 6. The outcome variable Status codes the age at which maturation occurs conditional on age and length. Immaturity (failure to mature) is coded as 1, maturity ranges from 2 to 6.
The .R, .stan, and .txt data file are attached.
When I run the simple fit command below for a total of 400 iterations or fewer the program runs, but this number of iterations is too few to achieve any credible sampling of the posterior. If I try to run, say, at total of 500 iteration, the program hangs at around 280 iterations.

``````fit<-stan(file = 'MLTest1.stan', data = stanDat, control = list(adapt_delta = 0.99, max_treedepth=20), iter = 400, chains = 1)
``````

So, I think I need to set some initial values, as follows:

``````fit<-stan(file = 'MLTest1.stan', data = stanDat,control = list(adapt_delta = 0.99, max_treedepth=20), init=list(list(beta[1,1] = 0.0,beta[1,2] = 0.0,beta[1,3] = 0.0,beta[1,4] = 0.0, beta[1,5] = 0.0, beta[1,6] = 0.0, beta[2,1] = 0.0, beta[2,2] = 0.0, beta[2,3] = 0, beta[2,4] = 0.0,beta[2,5] = 0.0, beta[2,6] = 0.0)), iter = 100, chains = 1)
``````

But doing so using the code above produces the error message:

``````Error: unexpected '=' in:
"fit<-stan(file = 'MLTest1.stan', data = stanDat,control = list(adapt_delta = 0.99, max_treedepth=20),
init=list(list(beta[1,1] ="
>         beta[2,1] = 0.0, beta[2,2] = 0.0, beta[2,3] = 0, beta[2,4] = 0.0,beta[2,5] = 0.0)),iter = 100, chains = 1)
Error: unexpected ',' in "        beta[2,1] = 0.0,"
``````

Isn’t it possible to set initial values for two dimensional parameter
Variables? What am I doing wrong and/or failing to understand?
Any suggestions are most welcome.

Here are the .R, .stan, and text data files:

``````#MLTest.R 5 age classes , 2 to 6.
#Test of multi-logit regression of probability of maturation at age and length
#5 age classes (2 to 6), 6 possible fates: immature (coded as 1), mature at ages
#2 to 6.
#NG Sept 29 2021

TestData<- read.table("TestData.txt", header = TRUE)

y<-TestData\$Status #mature = 2 to 6, immature = 1
l <-TestData\$Length
w<-TestData\$Age #ages = 2 to 6, coded as 1 to 5
N = nrow(TestData)

D = 2; # number of predictors
K = 6; #number of outomes (= 0 to 5)

x = data.frame(l,w);

stanDat<- list(y=y, l=l, w=w, x=x,D=D, K=K, N = N);

fit<-stan(file = 'MLTest1.stan', data = stanDat, control = list(adapt_delta = 0.99, max_treedepth=20),iter = 400, chains = 1)
``````
``````
fit<-stan(file = 'MLTest1.stan', data = stanDat,control = list(adapt_delta = 0.99, max_treedepth=20),
init=list(list(beta[1,1] = 0.0,beta[1,2] = 0.0,beta[1,3] = 0.0,beta[1,4] = 0.0, beta[1,5] = 0.0, beta[1,6] = 0.0,
beta[2,1] = 0.0, beta[2,2] = 0.0, beta[2,3] = 0, beta[2,4] = 0.0,beta[2,5] = 0.0, beta[2,6] = 0.0)),iter = 100, chains = 1)
``````
`````` //MLTest1.stan
//Test program to conduct a multi-logit regression (Stan Users manual section 2.6) on
//probability of age-at-maturity given age and length
//NG started september 27 2021

data{
int<lower=2> K;
int<lower=1> D;
int<lower=0> N;
int<lower=0, upper=K> y[N];
matrix[N,D] x;
}

parameters{
matrix[D,K] beta;

}

model{
matrix[N,K] x_beta = x*beta;

to_vector(beta) ~normal(0,5);

for (n in 1:N)
y[n] ~ categorical_logit(x_beta[n]');

}
``````
``````|Length|Age|Status|||
|---|---|---|---|---|
|369|2|2|||
|394|2|2|||
|394|2|2|||
|398|2|2|||
|401|2|2|||
|402|2|2|||
|404|2|2|||
|409|2|2|||
|410|2|2|||
|412|2|2|||
|415|2|2|||
|416|2|2|||
|421|2|2|||
|423|2|2|||
|424|2|2|||
|424|2|2|||
|431|2|2|||
|435|2|2|||
|435|2|2|||
|436|2|2|||
|438|2|2|||
|449|2|2|||
|453|2|2|||
|457|2|2|||
|446|2|2|||
|447|2|2|||
|448|2|2|||
|450|2|2|||
|454|2|2|||
|455|2|2|||
|457|2|2|||
|460|2|2|||
|463|2|2|||
|463|2|2|||
|463|2|2|||
|471|2|2|||
|472|2|2|||
|475|2|2|||
|476|2|2|||
|477|2|2|||
|486|2|2|||
|488|2|2|||
|490|2|2|||
|497|2|2|||
|498|2|2|||
|498|2|2|||
|509|2|2|||
|514|2|2|||
|525|2|2|||
|532|2|2|||
|540|2|2|||
|549|2|2|||
|556|2|2|||
|557|2|2|||
|559|2|2|||
|559|2|2|||
|561|2|2|||
|568|2|2|||
|570|2|2|||
|571|2|2|||
|574|2|2|||
|575|2|2|||
|579|2|2|||
|579|2|2|||
|582|2|2|||
|584|2|2|||
|585|2|2|||
|587|2|2|||
|587|2|2|||
|587|2|2|||
|588|2|2|||
|590|2|2|||
|592|2|2|||
|593|2|2|||
|594|2|2|||
|594|2|2|||
|594|2|2|||
|596|2|2|||
|598|2|2|||
|599|2|2|||
|602|2|2|||
|603|2|2|||
|604|2|2|||
|604|2|2|||
|605|2|2|||
|606|2|2|||
|608|2|2|||
|608|2|2|||
|609|2|2|||
|610|2|2|||
|612|2|2|||
|613|2|2|||
|614|2|2|||
|615|2|2|||
|616|2|2|||
|616|2|2|||
|618|2|2|||
|619|2|2|||
|620|2|2|||
|622|2|2|||
|622|2|2|||
|622|2|2|||
|622|2|2|||
|624|2|2|||
|624|2|2|||
|625|2|2|||
|625|2|2|||
|626|2|2|||
|627|2|2|||
|627|2|2|||
|629|2|2|||
|629|2|2|||
|630|2|2|||
|631|2|2|||
|631|2|2|||
|631|2|2|||
|632|2|2|||
|632|2|2|||
|633|2|2|||
|633|2|2|||
|634|2|2|||
|634|2|2|||
|635|2|2|||
|636|2|2|||
|637|2|2|||
|638|2|2|||
|642|2|2|||
|644|2|2|||
|645|2|2|||
|646|2|2|||
|648|2|2|||
|648|2|2|||
|649|2|2|||
|651|2|2|||
|654|2|2|||
|656|2|2|||
|657|2|2|||
|658|2|2|||
|661|2|2|||
|322|2|1|||
|323|2|1|||
|324|2|1|||
|324|2|1|||
|324|2|1|||
|325|2|1|||
|326|2|1|||
|326|2|1|||
|326|2|1|||
|326|2|1|||
|326|2|1|||
|327|2|1|||
|327|2|1|||
|327|2|1|||
|327|2|1|||
|327|2|1|||
|327|2|1|||
|328|2|1|||
|328|2|1|||
|328|2|1|||
|328|2|1|||
|328|2|1|||
|328|2|1|||
|328|2|1|||
|329|2|1|||
|329|2|1|||
|329|2|1|||
|329|2|1|||
|329|2|1|||
|329|2|1|||
|329|2|1|||
|330|2|1|||
|330|2|1|||
|330|2|1|||
|331|2|1|||
|331|2|1|||
|331|2|1|||
|331|2|1|||
|331|2|1|||
|332|2|1|||
|332|2|1|||
|332|2|1|||
|332|2|1|||
|333|2|1|||
|333|2|1|||
|333|2|1|||
|333|2|1|||
|333|2|1|||
|334|2|1|||
|334|2|1|||
|335|2|1|||
|336|2|1|||
|347|2|1|||
|347|2|1|||
|348|2|1|||
|348|2|1|||
|348|2|1|||
|349|2|1|||
|349|2|1|||
|350|2|1|||
|350|2|1|||
|352|2|1|||
|352|2|1|||
|352|2|1|||
|352|2|1|||
|352|2|1|||
|352|2|1|||
|353|2|1|||
|353|2|1|||
|353|2|1|||
|353|2|1|||
|353|2|1|||
|353|2|1|||
|353|2|1|||
|353|2|1|||
|353|2|1|||
|354|2|1|||
|354|2|1|||
|354|2|1|||
|354|2|1|||
|354|2|1|||
|354|2|1|||
|355|2|1|||
|355|2|1|||
|355|2|1|||
|355|2|1|||
|355|2|1|||
|355|2|1|||
|355|2|1|||
|355|2|1|||
|356|2|1|||
|356|2|1|||
|356|2|1|||
|356|2|1|||
|356|2|1|||
|356|2|1|||
|356|2|1|||
|357|2|1|||
|357|2|1|||
|357|2|1|||
|357|2|1|||
|357|2|1|||
|357|2|1|||
|357|2|1|||
|357|2|1|||
|358|2|1|||
|358|2|1|||
|358|2|1|||
|358|2|1|||
|358|2|1|||
|358|2|1|||
|358|2|1|||
|358|2|1|||
|358|2|1|||
|359|2|1|||
|359|2|1|||
|359|2|1|||
|359|2|1|||
|359|2|1|||
|359|2|1|||
|359|2|1|||
|360|2|1|||
|360|2|1|||
|360|2|1|||
|360|2|1|||
|360|2|1|||
|360|2|1|||
|361|2|1|||
|361|2|1|||
|361|2|1|||
|361|2|1|||
|361|2|1|||
|362|2|1|||
|362|2|1|||
|362|2|1|||
|362|2|1|||
|362|2|1|||
|362|2|1|||
|362|2|1|||
|363|2|1|||
|364|2|1|||
|364|2|1|||
|364|2|1|||
|365|2|1|||
|366|2|1|||
|367|2|1|||
|367|2|1|||
|370|2|1|||
|386|2|1|||
|386|2|1|||
|388|2|1|||
|388|2|1|||
|388|2|1|||
|389|2|1|||
|389|2|1|||
|389|2|1|||
|389|2|1|||
|390|2|1|||
|390|2|1|||
|391|2|1|||
|391|2|1|||
|391|2|1|||
|391|2|1|||
|391|2|1|||
|391|2|1|||
|391|2|1|||
|392|2|1|||
|392|2|1|||
|392|2|1|||
|392|2|1|||
|392|2|1|||
|392|2|1|||
|392|2|1|||
|393|2|1|||
|393|2|1|||
|393|2|1|||
|393|2|1|||
|393|2|1|||
|393|2|1|||
|393|2|1|||
|393|2|1|||
|393|2|1|||
|393|2|1|||
|393|2|1|||
|393|2|1|||
|394|2|1|||
|394|2|1|||
|394|2|1|||
|394|2|1|||
|394|2|1|||
|394|2|1|||
|394|2|1|||
|394|2|1|||
|395|2|1|||
|395|2|1|||
|395|2|1|||
|395|2|1|||
|395|2|1|||
|395|2|1|||
|395|2|1|||
|395|2|1|||
|395|2|1|||
|395|2|1|||
|395|2|1|||
|396|2|1|||
|396|2|1|||
|396|2|1|||
|396|2|1|||
|396|2|1|||
|396|2|1|||
|396|2|1|||
|396|2|1|||
|396|2|1|||
|396|2|1|||
|396|2|1|||
|396|2|1|||
|396|2|1|||
|396|2|1|||
|397|2|1|||
|397|2|1|||
|397|2|1|||
|397|2|1|||
|397|2|1|||
|398|2|1|||
|398|2|1|||
|398|2|1|||
|398|2|1|||
|398|2|1|||
|398|2|1|||
|398|2|1|||
|398|2|1|||
|398|2|1|||
|398|2|1|||
|398|2|1|||
|398|2|1|||
|399|2|1|||
|399|2|1|||
|399|2|1|||
|399|2|1|||
|399|2|1|||
|399|2|1|||
|399|2|1|||
|399|2|1|||
|399|2|1|||
|399|2|1|||
|399|2|1|||
|399|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|400|2|1|||
|401|2|1|||
|401|2|1|||
|401|2|1|||
|401|2|1|||
|401|2|1|||
|401|2|1|||
|401|2|1|||
|401|2|1|||
|401|2|1|||
|401|2|1|||
|401|2|1|||
|401|2|1|||
|402|2|1|||
|402|2|1|||
|402|2|1|||
|402|2|1|||
|402|2|1|||
|402|2|1|||
|402|2|1|||
|402|2|1|||
|402|2|1|||
|402|2|1|||
|402|2|1|||
|402|2|1|||
|402|2|1|||
|402|2|1|||
|403|2|1|||
|403|2|1|||
|403|2|1|||
|403|2|1|||
|403|2|1|||
|403|2|1|||
|403|2|1|||
|403|2|1|||
|403|2|1|||
|403|2|1|||
|403|2|1|||
|403|2|1|||
|404|2|1|||
|404|2|1|||
|404|2|1|||
|404|2|1|||
|404|2|1|||
|404|2|1|||
|404|2|1|||
|404|2|1|||
|404|2|1|||
|404|2|1|||
|404|2|1|||
|404|2|1|||
|405|2|1|||
|405|2|1|||
|405|2|1|||
|405|2|1|||
|405|2|1|||
|406|2|1|||
|406|2|1|||
|406|2|1|||
|406|2|1|||
|406|2|1|||
|406|2|1|||
|406|2|1|||
|406|2|1|||
|406|2|1|||
|406|2|1|||
|407|2|1|||
|407|2|1|||
|408|2|1|||
|408|2|1|||
|408|2|1|||
|408|2|1|||
|409|2|1|||
|409|2|1|||
|409|2|1|||
|409|2|1|||
|409|2|1|||
|409|2|1|||
|409|2|1|||
|410|2|1|||
|411|2|1|||
|411|2|1|||
|411|2|1|||
|411|2|1|||
|411|2|1|||
|412|2|1|||
|412|2|1|||
|412|2|1|||
|412|2|1|||
|412|2|1|||
|412|2|1|||
|413|2|1|||
|413|2|1|||
|413|2|1|||
|413|2|1|||
|413|2|1|||
|413|2|1|||
|413|2|1|||
|413|2|1|||
|413|2|1|||
|413|2|1|||
|413|2|1|||
|414|2|1|||
|414|2|1|||
|414|2|1|||
|414|2|1|||
|414|2|1|||
|414|2|1|||
|414|2|1|||
|414|2|1|||
|414|2|1|||
|415|2|1|||
|415|2|1|||
|415|2|1|||
|415|2|1|||
|415|2|1|||
|415|2|1|||
|415|2|1|||
|415|2|1|||
|415|2|1|||
|415|2|1|||
|415|2|1|||
|415|2|1|||
|416|2|1|||
|416|2|1|||
|416|2|1|||
|416|2|1|||
|416|2|1|||
|417|2|1|||
|417|2|1|||
|417|2|1|||
|417|2|1|||
|417|2|1|||
|417|2|1|||
|417|2|1|||
|417|2|1|||
|418|2|1|||
|418|2|1|||
|418|2|1|||
|418|2|1|||
|418|2|1|||
|418|2|1|||
|419|2|1|||
|419|2|1|||
|419|2|1|||
|419|2|1|||
|419|2|1|||
|419|2|1|||
|419|2|1|||
|419|2|1|||
|419|2|1|||
|419|2|1|||
|419|2|1|||
|420|2|1|||
|420|2|1|||
|420|2|1|||
|420|2|1|||
|420|2|1|||
|421|2|1|||
|421|2|1|||
|421|2|1|||
|421|2|1|||
|421|2|1|||
|421|2|1|||
|421|2|1|||
|421|2|1|||
|422|2|1|||
|422|2|1|||
|422|2|1|||
|422|2|1|||
|422|2|1|||
|423|2|1|||
|423|2|1|||
|423|2|1|||
|424|2|1|||
|424|2|1|||
|424|2|1|||
|424|2|1|||
|425|2|1|||
|426|2|1|||
|426|2|1|||
|426|2|1|||
|426|2|1|||
|426|2|1|||
|428|2|1|||
|430|2|1|||
|431|2|1|||
|640|3|3|||
|640|3|3|||
|640|3|3|||
|641|3|3|||
|646|3|3|||
|647|3|3|||
|647|3|3|||
|650|3|3|||
|651|3|3|||
|653|3|3|||
|655|3|3|||
|655|3|3|||
|656|3|3|||
|656|3|3|||
|656|3|3|||
|657|3|3|||
|657|3|3|||
|657|3|3|||
|658|3|3|||
|658|3|3|||
|659|3|3|||
|659|3|3|||
|660|3|3|||
|660|3|3|||
|661|3|3|||
|662|3|3|||
|663|3|3|||
|663|3|3|||
|664|3|3|||
|664|3|3|||
|665|3|3|||
|666|3|3|||
|666|3|3|||
|667|3|3|||
|667|3|3|||
|667|3|3|||
|668|3|3|||
|668|3|3|||
|670|3|3|||
|670|3|3|||
|670|3|3|||
|671|3|3|||
|671|3|3|||
|672|3|3|||
|673|3|3|||
|673|3|3|||
|673|3|3|||
|674|3|3|||
|674|3|3|||
|674|3|3|||
|674|3|3|||
|674|3|3|||
|675|3|3|||
|675|3|3|||
|676|3|3|||
|677|3|3|||
|677|3|3|||
|679|3|3|||
|681|3|3|||
|682|3|3|||
|682|3|3|||
|683|3|3|||
|683|3|3|||
|684|3|3|||
|684|3|3|||
|685|3|3|||
|685|3|3|||
|688|3|3|||
|688|3|3|||
|688|3|3|||
|689|3|3|||
|689|3|3|||
|689|3|3|||
|690|3|3|||
|691|3|3|||
|691|3|3|||
|694|3|3|||
|695|3|3|||
|697|3|3|||
|698|3|3|||
|698|3|3|||
|699|3|3|||
|699|3|3|||
|701|3|3|||
|701|3|3|||
|702|3|3|||
|704|3|3|||
|705|3|3|||
|706|3|3|||
|706|3|3|||
|707|3|3|||
|707|3|3|||
|709|3|3|||
|709|3|3|||
|709|3|3|||
|712|3|3|||
|712|3|3|||
|713|3|3|||
|716|3|3|||
|716|3|3|||
|719|3|3|||
|719|3|3|||
|721|3|3|||
|723|3|3|||
|726|3|3|||
|730|3|3|||
|733|3|3|||
|735|3|3|||
|737|3|3|||
|737|3|3|||
|738|3|3|||
|743|3|3|||
|751|3|3|||
|753|3|3|||
|754|3|3|||
|756|3|3|||
|759|3|3|||
|764|3|3|||
|766|3|3|||
|766|3|3|||
|767|3|3|||
|767|3|3|||
|770|3|3|||
|771|3|3|||
|772|3|3|||
|774|3|3|||
|776|3|3|||
|777|3|3|||
|779|3|3|||
|783|3|3|||
|783|3|3|||
|786|3|3|||
|786|3|3|||
|787|3|3|||
|787|3|3|||
|788|3|3|||
|788|3|3|||
|788|3|3|||
|789|3|3|||
|791|3|3|||
|791|3|3|||
|791|3|3|||
|791|3|3|||
|792|3|3|||
|792|3|3|||
|794|3|3|||
|794|3|3|||
|797|3|3|||
|797|3|3|||
|798|3|3|||
|799|3|3|||
|799|3|3|||
|799|3|3|||
|801|3|3|||
|802|3|3|||
|802|3|3|||
|802|3|3|||
|803|3|3|||
|803|3|3|||
|803|3|3|||
|803|3|3|||
|805|3|3|||
|805|3|3|||
|805|3|3|||
|806|3|3|||
|806|3|3|||
|807|3|3|||
|807|3|3|||
|807|3|3|||
|809|3|3|||
|810|3|3|||
|811|3|3|||
|811|3|3|||
|811|3|3|||
|811|3|3|||
|812|3|3|||
|812|3|3|||
|812|3|3|||
|813|3|3|||
|813|3|3|||
|813|3|3|||
|814|3|3|||
|815|3|3|||
|815|3|3|||
|815|3|3|||
|815|3|3|||
|816|3|3|||
|816|3|3|||
|816|3|3|||
|816|3|3|||
|817|3|3|||
|817|3|3|||
|817|3|3|||
|817|3|3|||
|818|3|3|||
|818|3|3|||
|818|3|3|||
|819|3|3|||
|819|3|3|||
|819|3|3|||
|819|3|3|||
|819|3|3|||
|819|3|3|||
|819|3|3|||
|820|3|3|||
|820|3|3|||
|820|3|3|||
|821|3|3|||
|821|3|3|||
|821|3|3|||
|821|3|3|||
|821|3|3|||
|821|3|3|||
|823|3|3|||
|823|3|3|||
|824|3|3|||
|824|3|3|||
|824|3|3|||
|825|3|3|||
|826|3|3|||
|826|3|3|||
|826|3|3|||
|827|3|3|||
|827|3|3|||
|827|3|3|||
|827|3|3|||
|828|3|3|||
|828|3|3|||
|828|3|3|||
|828|3|3|||
|828|3|3|||
|829|3|3|||
|829|3|3|||
|829|3|3|||
|829|3|3|||
|829|3|3|||
|829|3|3|||
|829|3|3|||
|829|3|3|||
|829|3|3|||
|829|3|3|||
|830|3|3|||
|830|3|3|||
|830|3|3|||
|830|3|3|||
|830|3|3|||
|830|3|3|||
|831|3|3|||
|831|3|3|||
|832|3|3|||
|832|3|3|||
|832|3|3|||
|832|3|3|||
|832|3|3|||
|833|3|3|||
|833|3|3|||
|833|3|3|||
|833|3|3|||
|833|3|3|||
|834|3|3|||
|834|3|3|||
|835|3|3|||
|835|3|3|||
|835|3|3|||
|835|3|3|||
|836|3|3|||
|837|3|3|||
|837|3|3|||
|837|3|3|||
|838|3|3|||
|838|3|3|||
|839|3|3|||
|839|3|3|||
|839|3|3|||
|840|3|3|||
|840|3|3|||
|842|3|3|||
|842|3|3|||
|843|3|3|||
|843|3|3|||
|843|3|3|||
|843|3|3|||
|843|3|3|||
|844|3|3|||
|844|3|3|||
|844|3|3|||
|845|3|3|||
|845|3|3|||
|845|3|3|||
|846|3|3|||
|847|3|3|||
|849|3|3|||
|850|3|3|||
|851|3|3|||
|853|3|3|||
|853|3|3|||
|854|3|3|||
|855|3|3|||
|855|3|3|||
|856|3|3|||
|856|3|3|||
|859|3|3|||
|860|3|3|||
|860|3|3|||
|861|3|3|||
|861|3|3|||
|862|3|3|||
|862|3|3|||
|862|3|3|||
|865|3|3|||
|866|3|3|||
|866|3|3|||
|867|3|3|||
|868|3|3|||
|868|3|3|||
|870|3|3|||
|873|3|3|||
|875|3|3|||
|875|3|3|||
|504|3|1|||
|504|3|1|||
|505|3|1|||
|506|3|1|||
|506|3|1|||
|507|3|1|||
|508|3|1|||
|508|3|1|||
|508|3|1|||
|509|3|1|||
|510|3|1|||
|510|3|1|||
|511|3|1|||
|512|3|1|||
|512|3|1|||
|512|3|1|||
|513|3|1|||
|513|3|1|||
|513|3|1|||
|513|3|1|||
|513|3|1|||
|514|3|1|||
|514|3|1|||
|514|3|1|||
|515|3|1|||
|515|3|1|||
|515|3|1|||
|516|3|1|||
|516|3|1|||
|517|3|1|||
|517|3|1|||
|517|3|1|||
|517|3|1|||
|517|3|1|||
|517|3|1|||
|518|3|1|||
|518|3|1|||
|519|3|1|||
|519|3|1|||
|519|3|1|||
|519|3|1|||
|519|3|1|||
|519|3|1|||
|520|3|1|||
|520|3|1|||
|520|3|1|||
|521|3|1|||
|521|3|1|||
|522|3|1|||
|522|3|1|||
|525|3|1|||
|527|3|1|||
|544|3|1|||
|544|3|1|||
|546|3|1|||
|547|3|1|||
|548|3|1|||
|549|3|1|||
|549|3|1|||
|550|3|1|||
|551|3|1|||
|551|3|1|||
|551|3|1|||
|552|3|1|||
|553|3|1|||
|553|3|1|||
|553|3|1|||
|553|3|1|||
|554|3|1|||
|554|3|1|||
|555|3|1|||
|555|3|1|||
|556|3|1|||
|556|3|1|||
|556|3|1|||
|557|3|1|||
|558|3|1|||
|558|3|1|||
|558|3|1|||
|559|3|1|||
|559|3|1|||
|559|3|1|||
|559|3|1|||
|559|3|1|||
|559|3|1|||
|559|3|1|||
|559|3|1|||
|559|3|1|||
|560|3|1|||
|560|3|1|||
|560|3|1|||
|560|3|1|||
|560|3|1|||
|560|3|1|||
|560|3|1|||
|560|3|1|||
|561|3|1|||
|561|3|1|||
|561|3|1|||
|561|3|1|||
|561|3|1|||
|562|3|1|||
|562|3|1|||
|562|3|1|||
|562|3|1|||
|563|3|1|||
|563|3|1|||
|563|3|1|||
|564|3|1|||
|564|3|1|||
|564|3|1|||
|564|3|1|||
|564|3|1|||
|564|3|1|||
|565|3|1|||
|565|3|1|||
|565|3|1|||
|565|3|1|||
|565|3|1|||
|565|3|1|||
|567|3|1|||
|567|3|1|||
|567|3|1|||
|567|3|1|||
|568|3|1|||
|569|3|1|||
|570|3|1|||
|570|3|1|||
|570|3|1|||
|570|3|1|||
|571|3|1|||
|571|3|1|||
|572|3|1|||
|573|3|1|||
|573|3|1|||
|574|3|1|||
|574|3|1|||
|575|3|1|||
|575|3|1|||
|575|3|1|||
|576|3|1|||
|577|3|1|||
|577|3|1|||
|577|3|1|||
|578|3|1|||
|579|3|1|||
|581|3|1|||
|582|3|1|||
|600|3|1|||
|600|3|1|||
|601|3|1|||
|607|3|1|||
|609|3|1|||
|610|3|1|||
|611|3|1|||
|611|3|1|||
|611|3|1|||
|612|3|1|||
|612|3|1|||
|613|3|1|||
|613|3|1|||
|614|3|1|||
|614|3|1|||
|614|3|1|||
|614|3|1|||
|614|3|1|||
|614|3|1|||
|615|3|1|||
|616|3|1|||
|616|3|1|||
|616|3|1|||
|617|3|1|||
|617|3|1|||
|618|3|1|||
|618|3|1|||
|619|3|1|||
|619|3|1|||
|619|3|1|||
|620|3|1|||
|620|3|1|||
|620|3|1|||
|620|3|1|||
|620|3|1|||
|620|3|1|||
|620|3|1|||
|620|3|1|||
|621|3|1|||
|621|3|1|||
|621|3|1|||
|621|3|1|||
|622|3|1|||
|622|3|1|||
|622|3|1|||
|622|3|1|||
|622|3|1|||
|622|3|1|||
|623|3|1|||
|623|3|1|||
|623|3|1|||
|623|3|1|||
|623|3|1|||
|623|3|1|||
|623|3|1|||
|624|3|1|||
|624|3|1|||
|624|3|1|||
|624|3|1|||
|624|3|1|||
|624|3|1|||
|625|3|1|||
|625|3|1|||
|625|3|1|||
|625|3|1|||
|625|3|1|||
|625|3|1|||
|625|3|1|||
|625|3|1|||
|625|3|1|||
|626|3|1|||
|626|3|1|||
|626|3|1|||
|626|3|1|||
|627|3|1|||
|627|3|1|||
|627|3|1|||
|627|3|1|||
|627|3|1|||
|627|3|1|||
|627|3|1|||
|627|3|1|||
|627|3|1|||
|627|3|1|||
|628|3|1|||
|628|3|1|||
|628|3|1|||
|628|3|1|||
|628|3|1|||
|628|3|1|||
|629|3|1|||
|629|3|1|||
|629|3|1|||
|629|3|1|||
|629|3|1|||
|629|3|1|||
|629|3|1|||
|629|3|1|||
|630|3|1|||
|630|3|1|||
|630|3|1|||
|630|3|1|||
|630|3|1|||
|631|3|1|||
|631|3|1|||
|631|3|1|||
|631|3|1|||
|631|3|1|||
|631|3|1|||
|631|3|1|||
|631|3|1|||
|631|3|1|||
|631|3|1|||
|632|3|1|||
|632|3|1|||
|632|3|1|||
|632|3|1|||
|632|3|1|||
|632|3|1|||
|632|3|1|||
|632|3|1|||
|632|3|1|||
|632|3|1|||
|632|3|1|||
|632|3|1|||
|633|3|1|||
|633|3|1|||
|633|3|1|||
|633|3|1|||
|633|3|1|||
|633|3|1|||
|634|3|1|||
|634|3|1|||
|634|3|1|||
|634|3|1|||
|634|3|1|||
|634|3|1|||
|634|3|1|||
|634|3|1|||
|634|3|1|||
|634|3|1|||
|634|3|1|||
|635|3|1|||
|635|3|1|||
|635|3|1|||
|635|3|1|||
|636|3|1|||
|636|3|1|||
|636|3|1|||
|636|3|1|||
|636|3|1|||
|637|3|1|||
|637|3|1|||
|637|3|1|||
|637|3|1|||
|637|3|1|||
|637|3|1|||
|637|3|1|||
|637|3|1|||
|638|3|1|||
|638|3|1|||
|638|3|1|||
|638|3|1|||
|638|3|1|||
|638|3|1|||
|639|3|1|||
|639|3|1|||
|640|3|1|||
|640|3|1|||
|640|3|1|||
|640|3|1|||
|641|3|1|||
|641|3|1|||
|641|3|1|||
|642|3|1|||
|642|3|1|||
|642|3|1|||
|642|3|1|||
|642|3|1|||
|643|3|1|||
|644|3|1|||
|645|3|1|||
|645|3|1|||
|647|3|1|||
|647|3|1|||
|648|3|1|||
|648|3|1|||
|649|3|1|||
|652|3|1|||
|654|3|1|||
|657|3|1|||
|664|3|1|||
|822|4|4|||
|839|4|4|||
|839|4|4|||
|839|4|4|||
|841|4|4|||
|841|4|4|||
|841|4|4|||
|841|4|4|||
|842|4|4|||
|842|4|4|||
|842|4|4|||
|843|4|4|||
|843|4|4|||
|843|4|4|||
|843|4|4|||
|844|4|4|||
|846|4|4|||
|847|4|4|||
|848|4|4|||
|848|4|4|||
|848|4|4|||
|848|4|4|||
|848|4|4|||
|849|4|4|||
|850|4|4|||
|850|4|4|||
|851|4|4|||
|853|4|4|||
|853|4|4|||
|854|4|4|||
|854|4|4|||
|854|4|4|||
|855|4|4|||
|857|4|4|||
|858|4|4|||
|858|4|4|||
|858|4|4|||
|858|4|4|||
|859|4|4|||
|859|4|4|||
|859|4|4|||
|861|4|4|||
|861|4|4|||
|862|4|4|||
|862|4|4|||
|862|4|4|||
|863|4|4|||
|864|4|4|||
|864|4|4|||
|865|4|4|||
|865|4|4|||
|866|4|4|||
|866|4|4|||
|866|4|4|||
|866|4|4|||
|866|4|4|||
|867|4|4|||
|867|4|4|||
|868|4|4|||
|868|4|4|||
|869|4|4|||
|869|4|4|||
|869|4|4|||
|869|4|4|||
|869|4|4|||
|870|4|4|||
|870|4|4|||
|870|4|4|||
|871|4|4|||
|871|4|4|||
|871|4|4|||
|873|4|4|||
|873|4|4|||
|874|4|4|||
|874|4|4|||
|874|4|4|||
|874|4|4|||
|875|4|4|||
|876|4|4|||
|876|4|4|||
|877|4|4|||
|877|4|4|||
|877|4|4|||
|877|4|4|||
|877|4|4|||
|878|4|4|||
|878|4|4|||
|878|4|4|||
|879|4|4|||
|879|4|4|||
|879|4|4|||
|880|4|4|||
|880|4|4|||
|881|4|4|||
|881|4|4|||
|881|4|4|||
|882|4|4|||
|882|4|4|||
|882|4|4|||
|882|4|4|||
|883|4|4|||
|883|4|4|||
|883|4|4|||
|884|4|4|||
|884|4|4|||
|884|4|4|||
|885|4|4|||
|885|4|4|||
|885|4|4|||
|886|4|4|||
|886|4|4|||
|887|4|4|||
|887|4|4|||
|887|4|4|||
|887|4|4|||
|888|4|4|||
|888|4|4|||
|888|4|4|||
|888|4|4|||
|888|4|4|||
|888|4|4|||
|889|4|4|||
|890|4|4|||
|890|4|4|||
|890|4|4|||
|890|4|4|||
|890|4|4|||
|891|4|4|||
|892|4|4|||
|892|4|4|||
|892|4|4|||
|892|4|4|||
|892|4|4|||
|892|4|4|||
|892|4|4|||
|893|4|4|||
|893|4|4|||
|893|4|4|||
|893|4|4|||
|894|4|4|||
|894|4|4|||
|894|4|4|||
|895|4|4|||
|895|4|4|||
|895|4|4|||
|896|4|4|||
|896|4|4|||
|896|4|4|||
|897|4|4|||
|897|4|4|||
|897|4|4|||
|897|4|4|||
|897|4|4|||
|898|4|4|||
|898|4|4|||
|898|4|4|||
|898|4|4|||
|898|4|4|||
|899|4|4|||
|899|4|4|||
|900|4|4|||
|900|4|4|||
|900|4|4|||
|901|4|4|||
|901|4|4|||
|901|4|4|||
|901|4|4|||
|901|4|4|||
|901|4|4|||
|902|4|4|||
|902|4|4|||
|903|4|4|||
|903|4|4|||
|903|4|4|||
|904|4|4|||
|904|4|4|||
|904|4|4|||
|904|4|4|||
|905|4|4|||
|905|4|4|||
|906|4|4|||
|906|4|4|||
|906|4|4|||
|906|4|4|||
|907|4|4|||
|907|4|4|||
|907|4|4|||
|907|4|4|||
|908|4|4|||
|908|4|4|||
|909|4|4|||
|909|4|4|||
|909|4|4|||
|909|4|4|||
|910|4|4|||
|910|4|4|||
|910|4|4|||
|911|4|4|||
|911|4|4|||
|911|4|4|||
|911|4|4|||
|911|4|4|||
|911|4|4|||
|912|4|4|||
|912|4|4|||
|913|4|4|||
|913|4|4|||
|913|4|4|||
|914|4|4|||
|914|4|4|||
|914|4|4|||
|914|4|4|||
|915|4|4|||
|916|4|4|||
|916|4|4|||
|917|4|4|||
|917|4|4|||
|917|4|4|||
|918|4|4|||
|918|4|4|||
|918|4|4|||
|919|4|4|||
|919|4|4|||
|919|4|4|||
|919|4|4|||
|921|4|4|||
|921|4|4|||
|922|4|4|||
|922|4|4|||
|923|4|4|||
|923|4|4|||
|924|4|4|||
|924|4|4|||
|925|4|4|||
|925|4|4|||
|926|4|4|||
|927|4|4|||
|927|4|4|||
|927|4|4|||
|928|4|4|||
|928|4|4|||
|928|4|4|||
|929|4|4|||
|929|4|4|||
|930|4|4|||
|931|4|4|||
|931|4|4|||
|933|4|4|||
|933|4|4|||
|933|4|4|||
|933|4|4|||
|933|4|4|||
|933|4|4|||
|934|4|4|||
|934|4|4|||
|934|4|4|||
|935|4|4|||
|935|4|4|||
|935|4|4|||
|936|4|4|||
|936|4|4|||
|936|4|4|||
|936|4|4|||
|936|4|4|||
|937|4|4|||
|937|4|4|||
|937|4|4|||
|937|4|4|||
|937|4|4|||
|938|4|4|||
|938|4|4|||
|938|4|4|||
|940|4|4|||
|941|4|4|||
|941|4|4|||
|943|4|4|||
|943|4|4|||
|943|4|4|||
|943|4|4|||
|944|4|4|||
|944|4|4|||
|944|4|4|||
|945|4|4|||
|945|4|4|||
|945|4|4|||
|947|4|4|||
|948|4|4|||
|949|4|4|||
|950|4|4|||
|951|4|4|||
|952|4|4|||
|952|4|4|||
|952|4|4|||
|955|4|4|||
|958|4|4|||
|958|4|4|||
|959|4|4|||
|959|4|4|||
|962|4|4|||
|964|4|4|||
|966|4|4|||
|966|4|4|||
|966|4|4|||
|967|4|4|||
|968|4|4|||
|969|4|4|||
|970|4|4|||
|971|4|4|||
|972|4|4|||
|973|4|4|||
|974|4|4|||
|975|4|4|||
|977|4|4|||
|981|4|4|||
|981|4|4|||
|981|4|4|||
|984|4|4|||
|985|4|4|||
|987|4|4|||
|987|4|4|||
|990|4|4|||
|992|4|4|||
|992|4|4|||
|992|4|4|||
|993|4|4|||
|996|4|4|||
|997|4|4|||
|997|4|4|||
|1000|4|4|||
|1000|4|4|||
|1005|4|4|||
|1013|4|4|||
|1018|4|4|||
|1021|4|4|||
|1024|4|4|||
|1026|4|4|||
|1030|4|4|||
|1033|4|4|||
|1036|4|4|||
|1038|4|4|||
|1054|4|4|||
|1066|4|4|||
|1070|4|4|||
|1071|4|4|||
|1077|4|4|||
|1081|4|4|||
|667|4|1|||
|680|4|1|||
|682|4|1|||
|684|4|1|||
|684|4|1|||
|690|4|1|||
|690|4|1|||
|691|4|1|||
|692|4|1|||
|692|4|1|||
|692|4|1|||
|693|4|1|||
|694|4|1|||
|694|4|1|||
|694|4|1|||
|694|4|1|||
|695|4|1|||
|695|4|1|||
|695|4|1|||
|696|4|1|||
|696|4|1|||
|697|4|1|||
|697|4|1|||
|698|4|1|||
|698|4|1|||
|699|4|1|||
|699|4|1|||
|700|4|1|||
|700|4|1|||
|700|4|1|||
|701|4|1|||
|702|4|1|||
|703|4|1|||
|703|4|1|||
|703|4|1|||
|704|4|1|||
|704|4|1|||
|704|4|1|||
|705|4|1|||
|705|4|1|||
|705|4|1|||
|706|4|1|||
|707|4|1|||
|707|4|1|||
|707|4|1|||
|709|4|1|||
|711|4|1|||
|711|4|1|||
|713|4|1|||
|715|4|1|||
|716|4|1|||
|716|4|1|||
|734|4|1|||
|742|4|1|||
|743|4|1|||
|743|4|1|||
|746|4|1|||
|746|4|1|||
|747|4|1|||
|748|4|1|||
|749|4|1|||
|750|4|1|||
|750|4|1|||
|750|4|1|||
|750|4|1|||
|750|4|1|||
|751|4|1|||
|751|4|1|||
|751|4|1|||
|751|4|1|||
|752|4|1|||
|752|4|1|||
|753|4|1|||
|753|4|1|||
|754|4|1|||
|754|4|1|||
|754|4|1|||
|754|4|1|||
|754|4|1|||
|755|4|1|||
|755|4|1|||
|756|4|1|||
|756|4|1|||
|757|4|1|||
|758|4|1|||
|758|4|1|||
|758|4|1|||
|758|4|1|||
|759|4|1|||
|759|4|1|||
|759|4|1|||
|760|4|1|||
|760|4|1|||
|760|4|1|||
|760|4|1|||
|760|4|1|||
|760|4|1|||
|760|4|1|||
|760|4|1|||
|761|4|1|||
|761|4|1|||
|761|4|1|||
|761|4|1|||
|761|4|1|||
|761|4|1|||
|762|4|1|||
|762|4|1|||
|762|4|1|||
|762|4|1|||
|762|4|1|||
|762|4|1|||
|762|4|1|||
|763|4|1|||
|763|4|1|||
|763|4|1|||
|764|4|1|||
|764|4|1|||
|765|4|1|||
|765|4|1|||
|766|4|1|||
|767|4|1|||
|767|4|1|||
|767|4|1|||
|768|4|1|||
|768|4|1|||
|768|4|1|||
|769|4|1|||
|769|4|1|||
|770|4|1|||
|770|4|1|||
|771|4|1|||
|773|4|1|||
|773|4|1|||
|774|4|1|||
|774|4|1|||
|774|4|1|||
|774|4|1|||
|775|4|1|||
|776|4|1|||
|776|4|1|||
|777|4|1|||
|777|4|1|||
|777|4|1|||
|778|4|1|||
|780|4|1|||
|781|4|1|||
|782|4|1|||
|783|4|1|||
|917|5|5|||
|919|5|5|||
|919|5|5|||
|920|5|5|||
|925|5|5|||
|926|5|5|||
|926|5|5|||
|928|5|5|||
|928|5|5|||
|932|5|5|||
|932|5|5|||
|935|5|5|||
|935|5|5|||
|936|5|5|||
|938|5|5|||
|939|5|5|||
|940|5|5|||
|940|5|5|||
|942|5|5|||
|942|5|5|||
|943|5|5|||
|944|5|5|||
|944|5|5|||
|944|5|5|||
|947|5|5|||
|947|5|5|||
|948|5|5|||
|948|5|5|||
|949|5|5|||
|951|5|5|||
|955|5|5|||
|955|5|5|||
|956|5|5|||
|957|5|5|||
|958|5|5|||
|958|5|5|||
|959|5|5|||
|959|5|5|||
|959|5|5|||
|960|5|5|||
|960|5|5|||
|960|5|5|||
|961|5|5|||
|961|5|5|||
|962|5|5|||
|962|5|5|||
|964|5|5|||
|965|5|5|||
|966|5|5|||
|966|5|5|||
|967|5|5|||
|967|5|5|||
|967|5|5|||
|968|5|5|||
|971|5|5|||
|972|5|5|||
|972|5|5|||
|973|5|5|||
|973|5|5|||
|974|5|5|||
|974|5|5|||
|976|5|5|||
|977|5|5|||
|977|5|5|||
|979|5|5|||
|979|5|5|||
|979|5|5|||
|980|5|5|||
|980|5|5|||
|980|5|5|||
|981|5|5|||
|981|5|5|||
|984|5|5|||
|984|5|5|||
|986|5|5|||
|986|5|5|||
|987|5|5|||
|987|5|5|||
|989|5|5|||
|989|5|5|||
|990|5|5|||
|990|5|5|||
|991|5|5|||
|992|5|5|||
|993|5|5|||
|994|5|5|||
|994|5|5|||
|995|5|5|||
|995|5|5|||
|996|5|5|||
|997|5|5|||
|997|5|5|||
|999|5|5|||
|999|5|5|||
|999|5|5|||
|1002|5|5|||
|1003|5|5|||
|1004|5|5|||
|1004|5|5|||
|1006|5|5|||
|1007|5|5|||
|1008|5|5|||
|1009|5|5|||
|1009|5|5|||
|1010|5|5|||
|1011|5|5|||
|1011|5|5|||
|1014|5|5|||
|1018|5|5|||
|1018|5|5|||
|1019|5|5|||
|1019|5|5|||
|1020|5|5|||
|1020|5|5|||
|1022|5|5|||
|1025|5|5|||
|1025|5|5|||
|1027|5|5|||
|1027|5|5|||
|1028|5|5|||
|1029|5|5|||
|1031|5|5|||
|1031|5|5|||
|1032|5|5|||
|1034|5|5|||
|1035|5|5|||
|1039|5|5|||
|1039|5|5|||
|1040|5|5|||
|1042|5|5|||
|1042|5|5|||
|1044|5|5|||
|1044|5|5|||
|1048|5|5|||
|1050|5|5|||
|1052|5|5|||
|1053|5|5|||
|1054|5|5|||
|1068|5|5|||
|1068|5|5|||
|1072|5|5|||
|1073|5|5|||
|1074|5|5|||
|1075|5|5|||
|851|5|1|||
|854|5|1|||
|854|5|1|||
|859|5|1|||
|863|5|1|||
|865|5|1|||
|866|5|1|||
|866|5|1|||
|866|5|1|||
|867|5|1|||
|867|5|1|||
|868|5|1|||
|869|5|1|||
|871|5|1|||
|871|5|1|||
|872|5|1|||
|872|5|1|||
|873|5|1|||
|874|5|1|||
|874|5|1|||
|874|5|1|||
|874|5|1|||
|876|5|1|||
|878|5|1|||
|878|5|1|||
|879|5|1|||
|880|5|1|||
|881|5|1|||
|881|5|1|||
|881|5|1|||
|882|5|1|||
|882|5|1|||
|885|5|1|||
|885|5|1|||
|885|5|1|||
|886|5|1|||
|887|5|1|||
|888|5|1|||
|888|5|1|||
|889|5|1|||
|889|5|1|||
|890|5|1|||
|891|5|1|||
|891|5|1|||
|892|5|1|||
|893|5|1|||
|893|5|1|||
|894|5|1|||
|901|5|1|||
|904|5|1|||
|904|5|1|||
|907|5|1|||
|1054|6|6|||
|1050|6|6|||
|1039|6|6|||
|1100|6|6|||
|1130|6|6|||
|1102|6|6|||
|1095|6|6|||
|1048|6|6|||
|1094|6|6|||
|1100|6|6|||
|1045|6|6|||
|1081|6|6|||
|1056|6|6|||
|1022|6|6|||
|1040|6|6|||
|1065|6|6|||
|1138|6|6|||
|1050|6|6|||
|1053|6|6|||
|1076|6|6|||
|1043|6|6|||
|1067|6|6|||
|1031|6|6|||
|1071|6|6|||
|1051|6|6|||
|1111|6|6|||
|1114|6|6|||
|1014|6|6|||
|1145|6|6|||
|1069|6|6|||
|1116|6|6|||
|1119|6|6|||
|1096|6|6|||
|1056|6|6|||
|1082|6|6|||
|1067|6|6|||
|1080|6|6|||
|1115|6|6|||
|1040|6|6|||
|1098|6|6|||
|1205|6|6|||
|1099|6|6|||
|1069|6|6|||
|1100|6|6|||
|1070|6|6|||
|1091|6|6|||
|1081|6|6|||
|1028|6|6|||
|1106|6|6|||
|1063|6|6|||
|1110|6|6|||
|1075|6|6|||
``````

Afternoon,

I did some edits to your post that should help with readability of your code, data, and R script. If someone doesn’t get to this, I will try and get the code up and running later today.