Returning the coefficient parameters from JRI

91 views Asked by At

I am trying to run R summary command through JRI to get the result for mulitvariate Linear Regression

result <- lm(Performance Score ~ Department+Grade,data = StudentData)
summary(result)

Call:
lm(formula = Performace.Score ~ Department + Grade, data = tree)

Residuals:
Min      1Q  Median      3Q     Max 
-1.0146 -0.8472  0.1206  0.1528  1.3193 

Coefficients:
                            Estimate Std. Error t value Pr(>|t|)    
(Intercept)                    1.9085381  0.2063188   9.250   <2e-16 ***
DepartmentCentral Projects    -0.0618622  0.2086085  -0.297    0.767    
DepartmentConsulting Services -0.0529854  0.2104055  -0.252    0.801    
DepartmentDistribution        -0.2280968  0.2268197  -1.006    0.315    
DepartmentExecutive            0.0896884  0.4008410   0.224    0.823    
DepartmentFinance             -0.1366400  0.2503824  -0.546    0.585    
DepartmentHR                  -0.2093362  0.2544092  -0.823    0.411    
DepartmentIT                  -0.0301757  0.2236310  -0.135    0.893    
DepartmentLocal Projects       0.1047488  0.2099865   0.499    0.618
DepartmentOperations           0.1009253  0.2078236   0.486    0.627    
DepartmentR&D                 -0.0436125  0.2115470  -0.206    0.837    
DepartmentSales               -0.1824861  0.2310936  -0.790    0.430    
Grade                          0.0002534  0.0139614   0.018    0.986    
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.6768 on 1492 degrees of freedom
Multiple R-squared:  0.0195,    Adjusted R-squared:  0.01161 
F-statistic: 2.472 on 12 and 1492 DF,  p-value: 0.00335

Now, When i try to run the same command through JRI and trying to get only coefficients for same data ,will fetch below result :

[REAL* (1.9085381360123104, -0.061862224682688656, -0.0529853865573166, -0.22809675152091768, 0.0896883836938513, -0.13664002290293625, -0.20933620214453777, -0.03017568582453441, 0.10474877352108226, 0.10092534733241249, -0.04361245714602103, -0.1824861159548225, 2.5335432769115444E-4, 0.20631884004542614, 0.20860854811530719, 0.21040549853856627, 0.2268197334540003, 0.4008409534398062, 0.25038238782600725, 0.2544092401777455, 0.22363101707542418, 0.20998649433526015, 0.20782362789029826, 0.21154702570507078, 0.23109359545008445, 0.013961381053987209, 9.250430719715656, -0.29654693080215805, -0.2518251040269494, -1.0056301012591409, 0.22375054974845454, -0.5457253766502479, -0.8228325433395539, -0.13493515443055484, 0.49883576490325376, 0.48562980233261505, -0.20615963283182023, -0.7896632340650002, 0.018146795557793288, 7.495625279329623E-20, 0.7668537059840453, 0.8012109343341197, 0.31475660028966584, 0.8229820424275262, 0.5853363050818626, 0.4107347156441347, 0.8926813449490922, 0.6179686247435434, 0.6273009677306218, 0.8366943459235678, 0.42984994326833603, 0.9855241729402933)]

From the above result what i get from JRI,will fetch me only coefficient values not the parameters like what we get in R Console(Departments list and Grade in this Case).

How to get coefficient values along with parameters.

1

There are 1 answers

0
Anshu Dutta On

Have you tried asList() function?