How to read text log from R using Statconn

0

I have expression like this in R

GWR.Model<-(gwr(aver_expen~persenPeta+penghasila+persenList+Sarana_Pen+Sarana_Kes+Tenaga_kes+air_minum+gibur+kepadatan,data=yogya,adapt=0.0708904161097209,hatmatrix=TRUE))
GWR.Model

When I run it in RStudio the result is like this :

> GWR.Model
Call:
gwr(formula = aver_expen ~ persenPeta + penghasila + persenList + 
    Sarana_Pen + Sarana_Kes + Tenaga_kes + air_minum + gibur + 
    kepadatan, data = yogya, adapt = 0.0708904161097209, hatmatrix = TRUE)
Kernel function: gwr.Gauss 
Adaptive quantile: 0.07089042 (about 16 of 239)
Summary of GWR coefficient estimates:
                   Min.    1st Qu.     Median    3rd Qu.       Max.      Global
X.Intercept. -3.042e+05  8.616e+04  2.389e+05  3.529e+05  1.548e+06   38356.248
persenPeta   -3.766e+04 -1.961e+03 -8.126e+02 -2.821e+02  8.589e+02   -1038.892
penghasila   -1.312e+05  1.277e+05  1.630e+05  2.003e+05  3.483e+05  201733.332
persenList    1.308e+03  2.390e+03  3.103e+03  4.589e+03  7.571e+03    3387.975
Sarana_Pen   -1.116e+06 -2.126e+05  1.212e+05  5.466e+05  2.026e+06 -198611.727
Sarana_Kes   -2.073e+05 -1.188e+05 -6.105e+04 -3.334e+04  2.843e+04  -50481.418
Tenaga_kes   -1.788e+06  9.700e+04  2.523e+05  3.725e+05  1.053e+06  439128.864
air_minum    -2.514e+05 -1.106e+05 -5.073e+04 -1.372e+04  5.187e+04  -20198.634
gibur        -3.054e+05 -5.915e+04 -2.500e+04  2.474e+04  1.987e+05    9299.197
kepadatan    -2.555e+01  1.222e+01  2.803e+01  3.390e+01  5.608e+01      24.791
Number of data points: 239 
Effective number of parameters (residual: 2traceS - traceS'S): 69.98414 
Effective degrees of freedom (residual: 2traceS - traceS'S): 169.0159 
Sigma (residual: 2traceS - traceS'S): 207408.4 
Effective number of parameters (model: traceS): 52.7731 
Effective degrees of freedom (model: traceS): 186.2269 
Sigma (model: traceS): 197591.8 
Sigma (ML): 174417.9 
AICc (GWR p. 61, eq 2.33; p. 96, eq. 4.21): 6586.856 
AIC (GWR p. 96, eq. 4.22): 6500.108 
Residual sum of squares: 7.270765e+12 
Quasi-global R2: 0.7411431 

And I capture it in my C# like this :

    string gwr = "GWR.Model<-(gwr(aver_expen~persenPeta+penghasila+persenList+Sarana_Pen+Sarana_Kes+Tenaga_kes+air_minum+gibur+kepadatan,data=yogya,adapt=0.0708904161097209,hatmatrix=TRUE))";

    rconn.EvaluateNoReturn(gwr);
    object si = (object)formHome.rconn.GetSymbol("GWR.Model");

And I get error like this ..

Not able to bind to the source (Exception from HRESULT: 0x8004000A (OLE_E_CANT_BINDTOSOURCE))

How I can get the result like in the RStudio.. I just stuck using Evalute or EvaluteNoReturn..

Any help..?

c#
r
asked on Stack Overflow Jul 6, 2014 by mrhands • edited Jul 7, 2014 by mrhands

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0