I tried the following in APL:
'Y' ##.∆r.set 14 24 18 17 27
1
'X' ##.∆r.set 1 3 2 1 3
1
MODEL←##.∆r.eval 'lsfit(X,Y)'
MODEL.data
#.TamStat.[Rserve].[robject] ¯1 ¯1 ¯2 2 2 1 144 qt qr qraux rank pivot tol names qr class ¯44.72135955 ¯
10 ¯1.62645463 2.16472716 2.58236358 161 5 2 dim Intercept X dimnames ¯2.236067977 0.4472135955 0.447213
5955 0.4472135955 0.4472135955 ¯4.472135955 ¯2 0.1545084972 ¯0.3454915028 0.6545084972 1.447213595 1.654508497 2
1 2 1E¯7
I am trying to get MODEL$coefficients from R. I think it is in the first element of MODEL.data but I can't figure out how to extract the values that I got when I did this directly in R:
MODEL$coefficients
Intercept X
10 5
I tried the following in APL:
1
'X' ##.∆r.set 1 3 2 1 3
1
MODEL←##.∆r.eval 'lsfit(X,Y)'
MODEL.data
#.TamStat.[Rserve].[robject] ¯1 ¯1 ¯2 2 2 1 144 qt qr qraux rank pivot tol names qr class ¯44.72135955 ¯
10 ¯1.62645463 2.16472716 2.58236358 161 5 2 dim Intercept X dimnames ¯2.236067977 0.4472135955 0.447213
5955 0.4472135955 0.4472135955 ¯4.472135955 ¯2 0.1545084972 ¯0.3454915028 0.6545084972 1.447213595 1.654508497 2
1 2 1E¯7