Fitting quadratic terms in aster

52 views
Skip to first unread message

Amanda Gorton

unread,
May 13, 2019, 4:54:55 PM5/13/19
to Aster Analysis User Group
Hi,

My aster model contains the following predictors right now: latitude, longitude, trt, col, edge and all two-way interactions. Here is my current model, whereby clusters_art is my artifice:

clusters.2.aster.1 <- aster(resp~ varb + clusters_art:(Col + Edge + Latitude + Trt + Longitude.Latitude*Longitude.Category + Latitude*Trt + Longitude.Category*Trt), pred1, fam1, varb, id, root, data = reshape.precip)

I would like to fit the quadratic terms with Latitude (i.e, Latitude^2 and Latitude^2 * Trt), but not sure of the syntax.

I tried the following model with all factors , but it wouldn't converge (i.e. couldn't compute standard error):

clusters.2.aster.1.quad <- aster(resp~ varb + clusters_art:(Col + Edge + Latitude + Longitude.Category + Trt + I(Latitude^2) + Latitude*Longitude.Category + Latitude*Trt + Longitude.Category*Trt + I(Latitude^2)*Trt + I(Latitude^2)*Longitude.Category), pred1, fam1, varb, id, root, data = reshape.precip)

I then tried a reduced model, with only those interactions with Trt, and it wouldn't work at all:

clusters.2.aster.2.quad <- aster(resp~ varb + clusters_art:(Col + Edge + Latitude + Longitude.Category + Trt + I(Latitude^2) + Latitude*Trt + Longitude.Category*Trt + I(Latitude^2)*Trt), pred1, fam1, varb, id, root, data = reshape.precip)

I received the following error with this second model:

Error in check.objfun.output(out, minimize, d) : 
  objfun returned hessian not having all elements finite

Any help would be much obliged! 

Thank you!

Amanda

Amanda Gorton

unread,
Aug 14, 2019, 12:49:40 PM8/14/19
to Aster Analysis User Group
Hi everyone!

I completely forgot to post my solution to this, but I did end up getting it to work (with the help of Ruth Shaw).

1) My syntax for the quadratic terms was correct, which was reassuring 
2) The solution is simply scaling the Latitude variable. I divided Latitude by 100, and then the models worked!

I hope this helps someone else!

Amanda
Reply all
Reply to author
Forward
0 new messages