R studio 4.0 上的 easi 包

2024-02-16

easi 包(精确仿射石索引模型)有点旧,但对我的目的仍然有用。考虑到它是基于 R 2.15.3 构建的,有人设法将它安装在 Rstudio 4 上吗? 谢谢


我分叉了 github 存储库并更新了源代码以修复Error in class(ff) <- "formula" : attempt to set an attribute on NULL错误@MarioF。插图中的示例现已运行完毕。我不确定答案是否正确,因为我没有任何东西可以将它们进行比较,但根据源代码,它对我来说看起来不错。如果您过去运行过 easi,也许您可​​以使用此更新版本重新运行它,看看结果是否相同。

您可以使用以下命令安装更新的 easi 软件包devtools::install_github("https://github.com/jpmam1/easi", dependencies = TRUE), e.g.

devtools::install_github("https://github.com/jpmam1/easi", dependencies = TRUE)
#> Downloading GitHub repo jpmam1/easi@HEAD
#> 
#> * checking for file ‘/private/var/folders/gf/3p_ynkts411bs238rtw3y0b40000gn/T/RtmpIVvyAO/remotes920f6a08f9/jpmam1-easi-1c90fed/DESCRIPTION’ ... OK
#> * preparing ‘easi’:
#> * checking DESCRIPTION meta-information ... OK
#> * checking for LF line-endings in source and make files and shell scripts
#> * checking for empty or unneeded directories
#> * building ‘easi_0.2.tar.gz’
library(easi)

data(hixdata)

#******* Budget shares Matrix ************
shares_HIX=hixdata[,2:10]
#******* price Matrix (in logarithms) ****
log.price_HIX=hixdata[,11:19] 
#******* Demographic matrix **************
var.soc_HIX=hixdata[,21:25]
#******* logarithm of total expenditure **
#******* (here divised by a price index) *
log.exp_HIX=hixdata[,20]  

#******* Estimation... *******************
est <- easi(shares=shares_HIX,log.price=log.price_HIX,
            var.soc=var.soc_HIX,log.exp=log.exp_HIX)
#> 
#>  *** Please wait during the creation of final instruments... ***  
#> iteration =  1 
#> crit_test =  0.0132835 
#> iteration =  2 
#> crit_test =  0.0001305 
#> iteration =  3 
#> crit_test =  2e-06 
#> iteration =  4 
#> crit_test =  0 
#> 
#>  *** Creation of final instruments successfully completed... *** 
#> 
#>  *** Please wait during the estimation... *** 
#> iteration =  1 
#> crit_test =  0.000129 
#> iteration =  2 
#> crit_test =  0.0001305 
#> iteration =  3 
#> crit_test =  2e-06 
#> iteration =  4 
#> crit_test =  0 
#> 
#>  *** Estimation successfully completed ***

#******* Coefficients ********************
coef(est)
#>                    Estimate   Std. Error      t value     Pr(>|t|)
#> eq1_Constante  1.338565e-01 2.369823e-03  56.48376336 0.000000e+00
#> eq1_y^1       -6.191417e-02 4.024952e-03 -15.38258649 0.000000e+00
#> eq1_y^2        7.204632e-03 4.051263e-03   1.77836669 7.535151e-02
#> eq1_y^3       -5.431856e-03 4.554815e-03  -1.19255232 2.330521e-01
#> eq1_z1         1.271748e-03 8.724567e-05  14.57663475 0.000000e+00
#> eq1_z2        -1.132559e-02 1.965138e-03  -5.76325256 8.313371e-09
#> eq1_z3         1.792113e-02 2.234399e-03   8.02056136 1.110223e-15
#> eq1_z4        -6.937697e-05 3.847325e-04  -0.18032519 8.568982e-01
#> eq1_z5         1.138257e-02 2.681374e-03   4.24504945 2.190544e-05
#> eq1_ps1        1.589244e-03 2.153198e-02   0.07380854 9.411631e-01
#> eq1_ps2        1.999501e-02 1.821433e-02   1.09776281 2.723149e-01
#> eq1_ps3        1.204415e-02 1.194709e-02   1.00812378 3.134013e-01
#> eq1_ps4       -2.036881e-02 1.314895e-02  -1.54908326 1.213699e-01
#> eq1_ps5        6.430660e-02 1.789467e-02   3.59361758 3.265234e-04
#> eq1_ps6        2.736144e-03 1.342038e-02   0.20387973 8.384486e-01
#> eq1_ps7       -2.617399e-02 1.049025e-02  -2.49507691 1.259712e-02
#> eq1_ps8       -4.267075e-02 1.706035e-02  -2.50116548 1.238263e-02
#> eq2_Constante  1.007420e-01 2.336590e-03  43.11496556 0.000000e+00
#> eq2_y^1        3.902061e-02 3.836550e-03  10.17075381 0.000000e+00
#> eq2_y^2       -7.944056e-03 3.861890e-03  -2.05703858 3.968921e-02
#> eq2_y^3       -1.024568e-02 4.341767e-03  -2.35979428 1.829001e-02
#> eq2_z1        -4.310734e-04 8.314643e-05  -5.18450900 2.176728e-07
#> eq2_z2        -3.307872e-02 1.872796e-03 -17.66274360 0.000000e+00
#> eq2_z3         9.510982e-03 2.133540e-03   4.45784203 8.302140e-06
#> eq2_z4        -2.282785e-03 4.791944e-04  -4.76379778 1.906713e-06
#> eq2_z5        -1.336479e-02 2.558504e-03  -5.22367336 1.763154e-07
#> eq2_ps1        1.999501e-02 1.821433e-02   1.09776281 2.723149e-01
#> eq2_ps2        3.768766e-02 2.352883e-02   1.60176508 1.092157e-01
#> eq2_ps3       -7.950078e-03 1.317920e-02  -0.60322912 5.463598e-01
#> eq2_ps4        3.483069e-02 1.225491e-02   2.84218238 4.482930e-03
#> eq2_ps5       -6.409116e-02 2.007544e-02  -3.19251592 1.411520e-03
#> eq2_ps6       -6.061289e-02 1.550821e-02  -3.90843934 9.305247e-05
#> eq2_ps7       -3.616433e-03 1.076989e-02  -0.33579105 7.370303e-01
#> eq2_ps8        2.174694e-02 1.949804e-02   1.11533982 2.647118e-01
#> ...

# Summary
summary(est)
#> 
#> systemfit results 
#> method: 3SLS 
#> 
#>            N    DF     SSR detRCov   OLS-R2 McElroy-R2
#> system 38776 38668 158.669       0 0.280103   0.242627
#> 
#>       N   DF      SSR      MSE     RMSE       R2   Adj R2
#> s1 4847 4830 21.64543 0.004481 0.066944 0.309899 0.307613
#> s2 4847 4830 19.65986 0.004070 0.063799 0.168230 0.165474
#> s3 4847 4830 51.76049 0.010716 0.103520 0.310185 0.307900
#> s4 4847 4830  7.97288 0.001651 0.040629 0.110327 0.107380
#> s5 4847 4830 11.03250 0.002284 0.047793 0.123788 0.120886
#> s6 4847 4830 11.22150 0.002323 0.048201 0.268442 0.266019
#> s7 4847 4830 16.20021 0.003354 0.057914 0.455128 0.453323
#> s8 4847 4830 19.17577 0.003970 0.063009 0.192375 0.189700
#> 
#> The covariance matrix of the residuals used for estimation
#>              eq1          eq2         eq3          eq4          eq5
#> eq1  4.47448e-03 -1.09828e-03 -0.00173277 -3.30061e-05 -2.67632e-04
#> eq2 -1.09828e-03  4.06524e-03 -0.00172840 -2.51369e-04 -4.33163e-04
#> eq3 -1.73277e-03 -1.72840e-03  0.01070944 -1.08355e-03 -1.10554e-03
#> eq4 -3.30061e-05 -2.51369e-04 -0.00108355  1.65633e-03 -3.00605e-05
#> eq5 -2.67632e-04 -4.33163e-04 -0.00110554 -3.00605e-05  2.28601e-03
#> eq6 -3.28393e-04 -1.06748e-05 -0.00142407 -1.18782e-04 -6.13193e-06
#> eq7 -3.86588e-04 -1.76507e-04 -0.00148981 -2.79601e-05 -3.26869e-04
#> eq8 -5.46867e-04 -3.79785e-04 -0.00173404 -1.71792e-04 -1.12276e-04
#>              eq6          eq7          eq8
#> eq1 -3.28393e-04 -3.86588e-04 -0.000546867
#> eq2 -1.06748e-05 -1.76507e-04 -0.000379785
#> eq3 -1.42407e-03 -1.48981e-03 -0.001734042
#> eq4 -1.18782e-04 -2.79601e-05 -0.000171792
#> eq5 -6.13193e-06 -3.26869e-04 -0.000112276
#> eq6  2.32137e-03 -2.81616e-04 -0.000366797
#> eq7 -2.81616e-04  3.35286e-03 -0.000588504
#> eq8 -3.66797e-04 -5.88504e-04  0.003967409
#> 
#> The covariance matrix of the residuals
#>              eq1          eq2         eq3          eq4          eq5
#> eq1  0.004481456 -1.10511e-03 -0.00173530 -3.39720e-05 -2.68323e-04
#> eq2 -0.001105107  4.07036e-03 -0.00172900 -2.50759e-04 -4.37042e-04
#> eq3 -0.001735298 -1.72900e-03  0.01071646 -1.08676e-03 -1.09946e-03
#> eq4 -0.000033972 -2.50759e-04 -0.00108676  1.65070e-03 -3.02961e-05
#> eq5 -0.000268323 -4.37042e-04 -0.00109946 -3.02961e-05  2.28416e-03
#> eq6 -0.000328667 -5.49536e-06 -0.00143105 -1.14912e-04 -5.66993e-06
#> eq7 -0.000388075 -1.77368e-04 -0.00149217 -2.97562e-05 -3.25903e-04
#> eq8 -0.000545727 -3.78073e-04 -0.00173896 -1.71989e-04 -1.10871e-04
#>              eq6          eq7          eq8
#> eq1 -3.28667e-04 -3.88075e-04 -0.000545727
#> eq2 -5.49536e-06 -1.77368e-04 -0.000378073
#> eq3 -1.43105e-03 -1.49217e-03 -0.001738959
#> eq4 -1.14912e-04 -2.97562e-05 -0.000171989
#> eq5 -5.66993e-06 -3.25903e-04 -0.000110871
#> eq6  2.32329e-03 -2.84649e-04 -0.000363633
#> eq7 -2.84649e-04  3.35408e-03 -0.000591536
#> eq8 -3.63633e-04 -5.91536e-04  0.003970139
#> 
#> The correlations of the residuals
#>            eq1         eq2       eq3        eq4         eq5         eq6
#> eq1  1.0000000 -0.25874870 -0.250403 -0.0124904 -0.08386578 -0.10185775
#> eq2 -0.2587487  1.00000000 -0.261789 -0.0967399 -0.14333193 -0.00178701
#> eq3 -0.2504027 -0.26178923  1.000000 -0.2583893 -0.22222295 -0.28679858
#> eq4 -0.0124904 -0.09673985 -0.258389  1.0000000 -0.01560230 -0.05867860
#> eq5 -0.0838658 -0.14333193 -0.222223 -0.0156023  1.00000000 -0.00246129
#> eq6 -0.1018577 -0.00178701 -0.286799 -0.0586786 -0.00246129  1.00000000
#> eq7 -0.1000967 -0.04800352 -0.248889 -0.0126461 -0.11774395 -0.10196952
#> eq8 -0.1293787 -0.09404945 -0.266600 -0.0671837 -0.03681726 -0.11973159
#>            eq7        eq8
#> eq1 -0.1000967 -0.1293787
#> eq2 -0.0480035 -0.0940494
#> eq3 -0.2488887 -0.2666005
#> eq4 -0.0126461 -0.0671837
#> eq5 -0.1177440 -0.0368173
#> eq6 -0.1019695 -0.1197316
#> eq7  1.0000000 -0.1621032
#> eq8 -0.1621032  1.0000000
#> 
#> 
#> 3SLS estimates for 's1' (equation 1)
#> Model Formula: ~+Constante + y^1 + y^2 + y^3 + z1 + z2 + z3 + z4 + z5 + ps1 + 
#>     ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8
#> <environment: 0x7fe638b791c8>
#> Instruments: [1] "~ + z1 + z2 + z3 + z4 + z5 + ps1 + ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8 + inst_y^1 + inst_y^2 + inst_y^3"
#> 
#>               Estimate   Std. Error   t value   Pr(>|t|)    
#> Constante  1.33857e-01  2.36982e-03  56.48376 < 2.22e-16 ***
#> y^1       -6.19142e-02  4.02495e-03 -15.38259 < 2.22e-16 ***
#> y^2        7.20463e-03  4.05126e-03   1.77837 0.07535151 .  
#> y^3       -5.43186e-03  4.55482e-03  -1.19255 0.23305207    
#> z1         1.27175e-03  8.72457e-05  14.57663 < 2.22e-16 ***
#> z2        -1.13256e-02  1.96514e-03  -5.76325 8.3134e-09 ***
#> z3         1.79211e-02  2.23440e-03   8.02056 1.1102e-15 ***
#> z4        -6.93770e-05  3.84732e-04  -0.18033 0.85689823    
#> z5         1.13826e-02  2.68137e-03   4.24505 2.1905e-05 ***
#> ps1        1.58924e-03  2.15320e-02   0.07381 0.94116312    
#> ps2        1.99950e-02  1.82143e-02   1.09776 0.27231491    
#> ps3        1.20441e-02  1.19471e-02   1.00812 0.31340135    
#> ps4       -2.03688e-02  1.31489e-02  -1.54908 0.12136989    
#> ps5        6.43066e-02  1.78947e-02   3.59362 0.00032652 ***
#> ps6        2.73614e-03  1.34204e-02   0.20388 0.83844856    
#> ps7       -2.61740e-02  1.04903e-02  -2.49508 0.01259712 *  
#> ps8       -4.26708e-02  1.70603e-02  -2.50117 0.01238263 *  
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Residual standard error: 0.066944 on 4830 degrees of freedom
#> Number of observations: 4847 Degrees of Freedom: 4830 
#> SSR: 21.645434 MSE: 0.004481 Root MSE: 0.066944 
#> Multiple R-Squared: 0.309899 Adjusted R-Squared: 0.307613 
#> 
#> 
#> 3SLS estimates for 's2' (equation 2)
#> Model Formula: ~+Constante + y^1 + y^2 + y^3 + z1 + z2 + z3 + z4 + z5 + ps1 + 
#>     ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8
#> <environment: 0x7fe638ab1510>
#> Instruments: [1] "~ + z1 + z2 + z3 + z4 + z5 + ps1 + ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8 + inst_y^1 + inst_y^2 + inst_y^3"
#> 
#>               Estimate   Std. Error   t value   Pr(>|t|)    
#> Constante  1.00742e-01  2.33659e-03  43.11497 < 2.22e-16 ***
#> y^1        3.90206e-02  3.83655e-03  10.17075 < 2.22e-16 ***
#> y^2       -7.94406e-03  3.86189e-03  -2.05704  0.0396892 *  
#> y^3       -1.02457e-02  4.34177e-03  -2.35979  0.0182900 *  
#> z1        -4.31073e-04  8.31464e-05  -5.18451 2.1767e-07 ***
#> z2        -3.30787e-02  1.87280e-03 -17.66274 < 2.22e-16 ***
#> z3         9.51098e-03  2.13354e-03   4.45784 8.3021e-06 ***
#> z4        -2.28279e-03  4.79194e-04  -4.76380 1.9067e-06 ***
#> z5        -1.33648e-02  2.55850e-03  -5.22367 1.7632e-07 ***
#> ps1        1.99950e-02  1.82143e-02   1.09776  0.2723149    
#> ps2        3.76877e-02  2.35288e-02   1.60177  0.1092157    
#> ps3       -7.95008e-03  1.31792e-02  -0.60323  0.5463598    
#> ps4        3.48307e-02  1.22549e-02   2.84218  0.0044829 ** 
#> ps5       -6.40912e-02  2.00754e-02  -3.19252  0.0014115 ** 
#> ps6       -6.06129e-02  1.55082e-02  -3.90844 9.3052e-05 ***
#> ps7       -3.61643e-03  1.07699e-02  -0.33579  0.7370303    
#> ps8        2.17469e-02  1.94980e-02   1.11534  0.2647118    
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Residual standard error: 0.063799 on 4830 degrees of freedom
#> Number of observations: 4847 Degrees of Freedom: 4830 
#> SSR: 19.659859 MSE: 0.00407 Root MSE: 0.063799 
#> Multiple R-Squared: 0.16823 Adjusted R-Squared: 0.165474 
#> 
#> 
#> 3SLS estimates for 's3' (equation 3)
#> Model Formula: ~+Constante + y^1 + y^2 + y^3 + z1 + z2 + z3 + z4 + z5 + ps1 + 
#>     ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8
#> <environment: 0x7fe638a587f0>
#> Instruments: [1] "~ + z1 + z2 + z3 + z4 + z5 + ps1 + ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8 + inst_y^1 + inst_y^2 + inst_y^3"
#> 
#>               Estimate   Std. Error   t value   Pr(>|t|)    
#> Constante  0.341632535  0.003138294 108.85932 < 2.22e-16 ***
#> y^1       -0.141730466  0.006225420 -22.76641 < 2.22e-16 ***
#> y^2       -0.044153992  0.006267277  -7.04516 1.8834e-12 ***
#> y^3        0.057029303  0.007045841   8.09404 4.4409e-16 ***
#> z1         0.000836942  0.000134738   6.21161 5.2978e-10 ***
#> z2         0.011815851  0.003038546   3.88865 0.00010097 ***
#> z3         0.034858317  0.003452690  10.09599 < 2.22e-16 ***
#> z4         0.003609541  0.000378017   9.54863 < 2.22e-16 ***
#> z5         0.013475472  0.004145172   3.25088 0.00115145 ** 
#> ps1        0.012044145  0.011947089   1.00812 0.31340135    
#> ps2       -0.007950078  0.013179200  -0.60323 0.54635982    
#> ps3        0.068069679  0.016510980   4.12269 3.7525e-05 ***
#> ps4       -0.012995886  0.008152114  -1.59417 0.11090531    
#> ps5        0.023882356  0.013056226   1.82919 0.06737841 .  
#> ps6       -0.024377790  0.009860607  -2.47224 0.01343120 *  
#> ps7       -0.009473078  0.010789996  -0.87795 0.37997626    
#> ps8       -0.024124565  0.013387121  -1.80207 0.07154175 .  
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Residual standard error: 0.10352 on 4830 degrees of freedom
#> Number of observations: 4847 Degrees of Freedom: 4830 
#> SSR: 51.760485 MSE: 0.010716 Root MSE: 0.10352 
#> Multiple R-Squared: 0.310185 Adjusted R-Squared: 0.3079 
#> 
#> 
#> 3SLS estimates for 's4' (equation 4)
#> Model Formula: ~+Constante + y^1 + y^2 + y^3 + z1 + z2 + z3 + z4 + z5 + ps1 + 
#>     ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8
#> <environment: 0x7fe6389fe748>
#> Instruments: [1] "~ + z1 + z2 + z3 + z4 + z5 + ps1 + ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8 + inst_y^1 + inst_y^2 + inst_y^3"
#> 
#>               Estimate   Std. Error  t value   Pr(>|t|)    
#> Constante  4.84964e-02  1.50619e-03 32.19806 < 2.22e-16 ***
#> y^1        7.27329e-03  2.44900e-03  2.96991 0.00298074 ** 
#> y^2        1.08792e-02  2.46514e-03  4.41322 1.0212e-05 ***
#> y^3       -8.20989e-03  2.77139e-03 -2.96237 0.00305468 ** 
#> z1        -1.62026e-04  5.31058e-05 -3.05099 0.00228241 ** 
#> z2         1.77838e-02  1.19562e-03 14.87405 < 2.22e-16 ***
#> z3         9.06894e-03  1.36008e-03  6.66796 2.6286e-11 ***
#> z4         5.12632e-04  2.85747e-04  1.79401 0.07281928 .  
#> z5         5.72461e-03  1.63275e-03  3.50611 0.00045522 ***
#> ps1       -2.03688e-02  1.31489e-02 -1.54908 0.12136989    
#> ps2        3.48307e-02  1.22549e-02  2.84218 0.00448293 ** 
#> ps3       -1.29959e-02  8.15211e-03 -1.59417 0.11090531    
#> ps4        4.33578e-02  1.21347e-02  3.57306 0.00035326 ***
#> ps5       -2.76387e-02  1.38733e-02 -1.99222 0.04635406 *  
#> ps6       -9.33810e-03  1.05280e-02 -0.88698 0.37509727    
#> ps7       -2.86846e-02  7.62226e-03 -3.76326 0.00016796 ***
#> ps8        3.11561e-02  1.28851e-02  2.41798 0.01561134 *  
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Residual standard error: 0.040629 on 4830 degrees of freedom
#> Number of observations: 4847 Degrees of Freedom: 4830 
#> SSR: 7.972878 MSE: 0.001651 Root MSE: 0.040629 
#> Multiple R-Squared: 0.110327 Adjusted R-Squared: 0.10738 
#> 
#> 
#> 3SLS estimates for 's5' (equation 5)
#> Model Formula: ~+Constante + y^1 + y^2 + y^3 + z1 + z2 + z3 + z4 + z5 + ps1 + 
#>     ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8
#> <environment: 0x7fe6389a95f0>
#> Instruments: [1] "~ + z1 + z2 + z3 + z4 + z5 + ps1 + ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8 + inst_y^1 + inst_y^2 + inst_y^3"
#> 
#>               Estimate   Std. Error  t value   Pr(>|t|)    
#> Constante  3.28683e-02  1.91029e-03 17.20593 < 2.22e-16 ***
#> y^1        4.47148e-02  2.87743e-03 15.53986 < 2.22e-16 ***
#> y^2        1.60626e-02  2.89648e-03  5.54554 2.9495e-08 ***
#> y^3       -5.28537e-03  3.25613e-03 -1.62321 0.10455363    
#> z1        -9.75294e-05  6.23902e-05 -1.56322 0.11800985    
#> z2         1.00156e-02  1.40536e-03  7.12672 1.0458e-12 ***
#> z3         7.99729e-03  1.59900e-03  5.00143 5.7156e-07 ***
#> z4         1.83941e-04  6.53334e-04  0.28154 0.77829675    
#> z5         1.50144e-03  1.91974e-03  0.78211 0.43415734    
#> ps1        6.43066e-02  1.78947e-02  3.59362 0.00032652 ***
#> ps2       -6.40912e-02  2.00754e-02 -3.19252 0.00141152 ** 
#> ps3        2.38824e-02  1.30562e-02  1.82919 0.06737841 .  
#> ps4       -2.76387e-02  1.38733e-02 -1.99222 0.04635406 *  
#> ps5       -1.35335e-02  3.82061e-02 -0.35422 0.72317415    
#> ps6        2.73453e-02  1.72358e-02  1.58654 0.11262429    
#> ps7       -1.29348e-02  9.80867e-03 -1.31872 0.18727197    
#> ps8       -1.21020e-02  3.03183e-02 -0.39916 0.68977392    
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Residual standard error: 0.047793 on 4830 degrees of freedom
#> Number of observations: 4847 Degrees of Freedom: 4830 
#> SSR: 11.032503 MSE: 0.002284 Root MSE: 0.047793 
#> Multiple R-Squared: 0.123788 Adjusted R-Squared: 0.120886 
#> 
#> 
#> 3SLS estimates for 's6' (equation 6)
#> Model Formula: ~+Constante + y^1 + y^2 + y^3 + z1 + z2 + z3 + z4 + z5 + ps1 + 
#>     ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8
#> <environment: 0x7fe638950a90>
#> Instruments: [1] "~ + z1 + z2 + z3 + z4 + z5 + ps1 + ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8 + inst_y^1 + inst_y^2 + inst_y^3"
#> 
#>               Estimate   Std. Error  t value   Pr(>|t|)    
#> Constante  6.80334e-02  1.79089e-03 37.98871 < 2.22e-16 ***
#> y^1        5.36278e-02  2.89953e-03 18.49537 < 2.22e-16 ***
#> y^2        2.08672e-02  2.91840e-03  7.15022 8.8174e-13 ***
#> y^3       -5.14651e-03  3.28118e-03 -1.56850 0.11677353    
#> z1        -3.88915e-04  6.28457e-05 -6.18842 6.1380e-10 ***
#> z2         2.64340e-02  1.41533e-03 18.67694 < 2.22e-16 ***
#> z3         1.12155e-02  1.61008e-03  6.96578 3.3182e-12 ***
#> z4        -9.50025e-04  3.64889e-04 -2.60360 0.00922851 ** 
#> z5        -8.57483e-03  1.93257e-03 -4.43702 9.1466e-06 ***
#> ps1        2.73614e-03  1.34204e-02  0.20388 0.83844856    
#> ps2       -6.06129e-02  1.55082e-02 -3.90844 9.3052e-05 ***
#> ps3       -2.43778e-02  9.86061e-03 -2.47224 0.01343120 *  
#> ps4       -9.33810e-03  1.05280e-02 -0.88698 0.37509727    
#> ps5        2.73453e-02  1.72358e-02  1.58654 0.11262429    
#> ps6        6.03096e-02  1.73455e-02  3.47695 0.00050771 ***
#> ps7        3.42362e-02  8.49490e-03  4.03020 5.5835e-05 ***
#> ps8        2.31777e-02  1.72462e-02  1.34393 0.17897735    
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Residual standard error: 0.048201 on 4830 degrees of freedom
#> Number of observations: 4847 Degrees of Freedom: 4830 
#> SSR: 11.221504 MSE: 0.002323 Root MSE: 0.048201 
#> Multiple R-Squared: 0.268442 Adjusted R-Squared: 0.266019 
#> 
#> 
#> 3SLS estimates for 's7' (equation 7)
#> Model Formula: ~+Constante + y^1 + y^2 + y^3 + z1 + z2 + z3 + z4 + z5 + ps1 + 
#>     ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8
#> <environment: 0x7fe6388f7d60>
#> Instruments: [1] "~ + z1 + z2 + z3 + z4 + z5 + ps1 + ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8 + inst_y^1 + inst_y^2 + inst_y^3"
#> 
#>               Estimate   Std. Error   t value   Pr(>|t|)    
#> Constante  1.70753e-01  2.02047e-03  84.51116 < 2.22e-16 ***
#> y^1       -1.48181e-02  3.48399e-03  -4.25320 2.1123e-05 ***
#> y^2       -2.28009e-02  3.50664e-03  -6.50221 8.0113e-11 ***
#> y^3       -2.47867e-03  3.94290e-03  -0.62864 0.52958738    
#> z1        -1.73485e-04  7.54648e-05  -2.29888 0.02151685 *  
#> z2        -1.28792e-02  1.70036e-03  -7.57438 3.6859e-14 ***
#> z3        -1.04241e-01  1.93289e-03 -53.92997 < 2.22e-16 ***
#> z4        -7.13305e-04  2.98228e-04  -2.39181 0.01677046 *  
#> z5        -8.31338e-03  2.31990e-03  -3.58350 0.00033944 ***
#> ps1       -2.61740e-02  1.04903e-02  -2.49508 0.01259712 *  
#> ps2       -3.61643e-03  1.07699e-02  -0.33579 0.73703026    
#> ps3       -9.47308e-03  1.07900e-02  -0.87795 0.37997626    
#> ps4       -2.86846e-02  7.62226e-03  -3.76326 0.00016796 ***
#> ps5       -1.29348e-02  9.80867e-03  -1.31872 0.18727197    
#> ps6        3.42362e-02  8.49490e-03   4.03020 5.5835e-05 ***
#> ps7        4.26305e-02  1.15967e-02   3.67608 0.00023716 ***
#> ps8       -4.02475e-03  1.03864e-02  -0.38750 0.69838808    
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Residual standard error: 0.057914 on 4830 degrees of freedom
#> Number of observations: 4847 Degrees of Freedom: 4830 
#> SSR: 16.200205 MSE: 0.003354 Root MSE: 0.057914 
#> Multiple R-Squared: 0.455128 Adjusted R-Squared: 0.453323 
#> 
#> 
#> 3SLS estimates for 's8' (equation 8)
#> Model Formula: ~+Constante + y^1 + y^2 + y^3 + z1 + z2 + z3 + z4 + z5 + ps1 + 
#>     ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8
#> <environment: 0x7fe63889fbd8>
#> Instruments: [1] "~ + z1 + z2 + z3 + z4 + z5 + ps1 + ps2 + ps3 + ps4 + ps5 + ps6 + ps7 + ps8 + inst_y^1 + inst_y^2 + inst_y^3"
#> 
#>               Estimate   Std. Error   t value   Pr(>|t|)    
#> Constante  8.30862e-02  2.24518e-03  37.00645 < 2.22e-16 ***
#> y^1        6.77452e-02  3.79020e-03  17.87379 < 2.22e-16 ***
#> y^2        2.06887e-02  3.81507e-03   5.42288 5.8997e-08 ***
#> y^3       -1.35795e-02  4.28911e-03  -3.16605  0.0015465 ** 
#> z1        -7.79162e-04  8.21321e-05  -9.48669 < 2.22e-16 ***
#> z2        -2.54823e-02  1.85051e-03 -13.77045 < 2.22e-16 ***
#> z3         1.02558e-02  2.10396e-03   4.87451 1.0951e-06 ***
#> z4         3.40386e-04  5.87519e-04   0.57936  0.5623482    
#> z5        -7.86386e-04  2.52459e-03  -0.31149  0.7554293    
#> ps1       -4.26708e-02  1.70603e-02  -2.50117  0.0123826 *  
#> ps2        2.17469e-02  1.94980e-02   1.11534  0.2647118    
#> ps3       -2.41246e-02  1.33871e-02  -1.80207  0.0715418 .  
#> ps4        3.11561e-02  1.28851e-02   2.41798  0.0156113 *  
#> ps5       -1.21020e-02  3.03183e-02  -0.39916  0.6897739    
#> ps6        2.31777e-02  1.72462e-02   1.34393  0.1789773    
#> ps7       -4.02475e-03  1.03864e-02  -0.38750  0.6983881    
#> ps8       -1.02249e-02  2.98625e-02  -0.34240  0.7320531    
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> Residual standard error: 0.063009 on 4830 degrees of freedom
#> Number of observations: 4847 Degrees of Freedom: 4830 
#> SSR: 19.175769 MSE: 0.00397 Root MSE: 0.063009 
#> Multiple R-Squared: 0.192375 Adjusted R-Squared: 0.1897

# fitted values
head(predict(est))
#>             s1          s2        s3         s4         s5         s6
#> [1,] 0.3148521 0.007088799 0.2718483 0.10431671 0.04797565 0.12398362
#> [2,] 0.2815752 0.007296639 0.3765217 0.07960349 0.03833235 0.11151020
#> [3,] 0.2159977 0.068854341 0.3748992 0.04737345 0.03658791 0.09920668
#> [4,] 0.2333557 0.069060035 0.3759948 0.04441345 0.02861974 0.09857289
#> [5,] 0.1253354 0.103084623 0.2460621 0.03725748 0.04965151 0.12915065
#> [6,] 0.2247643 0.075434197 0.3746137 0.03903780 0.03360408 0.10165050
#>              s7         s8
#> [1,] 0.03439408 0.04200202
#> [2,] 0.04535731 0.01645048
#> [3,] 0.07163017 0.06119997
#> [4,] 0.07645149 0.04879235
#> [5,] 0.18377317 0.09936264
#> [6,] 0.07717741 0.04963816

# Residuals 
head(residuals(est))
#>            s1           s2          s3           s4          s5            s6
#> 1  0.19184705 -0.007088799  0.09355974 -0.094572495  0.01048964 -0.0764805708
#> 2 -0.02243903 -0.007296639  0.22148493 -0.007344349 -0.03833235 -0.0699819603
#> 3  0.23676673 -0.036203058 -0.08060230 -0.031265482 -0.03658791 -0.0099598331
#> 4  0.02755754 -0.058021400 -0.14117293 -0.014308084 -0.01557408  0.1026313179
#> 5 -0.11269960  0.092265383  0.02687199  0.013538576 -0.02791788  0.0275337059
#> 6  0.00672091 -0.014730029 -0.08201964 -0.007066936 -0.03319938 -0.0008815854
#>             s7            s8
#> 1 -0.030740001 -0.0383479352
#> 2 -0.045357306 -0.0006697501
#> 3  0.016745977 -0.0524929638
#> 4 -0.040826807  0.1499030874
#> 5  0.055044122 -0.0708056495
#> 6  0.008617811  0.1219522859

# Covariance Matrix
dim(vcov(est))
#> [1] 136 136

Created on 2022-07-29 by the reprex package https://reprex.tidyverse.org (v2.0.1)


2023 年 6 月 5 日更新

修复了几个错误engel()函数@Prasanna S;如果您重新安装该软件包,它现在应该按预期工作:

# reinstall the updated package
remotes::install_github("jpmam1/easi", force = TRUE)
#> Downloading GitHub repo jpmam1/easi@HEAD
#> 
#> ── R CMD build ─────────────────────────────────────────────────────────────────
#> * checking for file ‘/private/var/folders/gf/3p_ynkts411bs238rtw3y0b40000gn/T/Rtmp5uN9An/remotes5734e908d92/jpmam1-easi-26fc918/DESCRIPTION’ ... OK
#> * preparing ‘easi’:
#> * checking DESCRIPTION meta-information ... OK
#> * checking for LF line-endings in source and make files and shell scripts
#> * checking for empty or unneeded directories
#> * building ‘easi_0.2.tar.gz’
library(easi)

easi::hixdemo()
#> 
#>  *** Please wait during the creation of final instruments... ***  
#> iteration =  1 
#> crit_test =  0.0132835 
#> iteration =  2 
#> crit_test =  0.0001305 
#> iteration =  3 
#> crit_test =  2e-06 
#> iteration =  4 
#> crit_test =  0 
#> 
#>  *** Creation of final instruments successfully completed... *** 
#> 
#>  *** Please wait during the estimation... *** 
#> iteration =  1 
#> crit_test =  0.000129 
#> iteration =  2 
#> crit_test =  0.0001305 
#> iteration =  3 
#> crit_test =  2e-06 
#> iteration =  4 
#> crit_test =  0 
#> 
#>  *** Estimation successfully completed ***
#> 
#> systemfit results 
#> method:  
#> 
#> Coefficients:
#> NULL

shares_HIX=hixdata[,2:10]
log.price_HIX=hixdata[,11:19] 
var.soc_HIX=hixdata[,21:25]
log.exp_HIX=hixdata[,20]  

est <- easi(shares=shares_HIX,log.price=log.price_HIX,
            var.soc=var.soc_HIX,log.exp=log.exp_HIX)
#> 
#>  *** Please wait during the creation of final instruments... ***  
#> iteration =  1 
#> crit_test =  0.0132835 
#> iteration =  2 
#> crit_test =  0.0001305 
#> iteration =  3 
#> crit_test =  2e-06 
#> iteration =  4 
#> crit_test =  0 
#> 
#>  *** Creation of final instruments successfully completed... *** 
#> 
#>  *** Please wait during the estimation... *** 
#> iteration =  1 
#> crit_test =  0.000129 
#> iteration =  2 
#> crit_test =  0.0001305 
#> iteration =  3 
#> crit_test =  2e-06 
#> iteration =  4 
#> crit_test =  0 
#> 
#>  *** Estimation successfully completed ***

engel(object = est, file = "graph_engels_curves", sd = FALSE)

Created on 2023-06-05 with reprex v2.0.2 https://reprex.tidyverse.org

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

R studio 4.0 上的 easi 包 的相关文章

  • 如何按时间间隔匹配数据帧?

    这是我从数据记录器导入原始数据时经常出现的问题 温度记录仪设置为每十分钟记录一次温度 单独的气体记录仪设置为记录最后十分钟间隔内使用的气体 我想将这两个记录器的数据合并到一个数据框中进行绘图和分析 但时间并不完全一致 我希望每十分钟的时间段
  • 将列表中的每个元素转换为数据框中的一列

    假设我有以下列表 d library combinat d permn c a b c 这看起来如下 1 1 a b c 2 1 a c b 3 1 c a b 4 1 c b a 5 1 b c a 6 1 b a c 是否可以将此列表的
  • 我可以使用哪个 R 函数来查找两条线的交点?

    我刚刚研究了 stackoverflow 上所有的 在 R 中寻找交集 问题 它们要么是关于曲线 要么是关于分布像这个 https stackoverflow com questions 20519431 finding point of
  • `as.matrix` 和 `as.data.frame` S3 方法与 S4 方法

    我注意到定义as matrix or as data frame作为 S4 类的 S3 方法 使例如lm formula objS4 and prcomp object 开箱即用 如果它们被定义为 S4 方法 则这不起作用 为什么将方法定义
  • R ggplot 中的柯尔莫哥洛夫-斯米尔诺夫图

    我正在尝试在 r 中绘制 KS 图 一切似乎都很顺利 除了我只能使用颜色来可视化两个不同的样本而不是线型这一事实 我已经尝试过以下方法 sample1 lt SD13009 sample2 lt SD13009PB group lt c r
  • 更新 R6 对象实例中的方法定义

    如何更新 R6 类实例的方法定义 正如我所期望的 S3 使用当前的方法定义 对于 R5 参考类 我可以使用 myInstance myInstance copy 在 R6 中 我尝试了 myInstance myInstance clone
  • 在 R 的 for 循环中创建动态命名对象并分配动态值

    我正在尝试创建一套动态命名的新对象 例如 temp2015 使用 for 循环 并存储动态值 具体来说 其他对象的名称 例如 Y2015 和 for 循环中使用的值 例如 2015 在动态命名的新对象中 我不确定为什么下面的代码不起作用 Y
  • 在 RMarkdown 输出到 PDF 时缩进而不添加项目符号点或编号

    之前有人问过如何在没有项目符号的情况下缩进文本 RMarkdown 中的点 但这是针对 HTML 输出的 在 RMarkdown 中缩进而不添加项目符号点或数字 https stackoverflow com questions 47087
  • 当设置 coord_fixed 时,ggplot/shiny 中的鼠标悬停坐标是错误的

    我正在使用问题中的答案 当您将鼠标悬停在闪亮的 ggplot 上时出现工具提示 https stackoverflow com questions 27965931 tooltip when you mouseover a ggplot o
  • 如何根据 ggplot2 中的汇总数据创建堆积条形图

    我正在尝试使用 ggplot 2 创建堆积条形图 我的宽格式数据如下所示 每个单元格中的数字是响应的频率 activity yes no dontknow Social events 27 3 3 Academic skills works
  • 当将遗传算法与 lme4 一起使用时,glmulti 无限期运行

    我在 R 中使用 glmulti 进行模型平均 我的模型中有大约 10 个变量 使得详尽的筛选不切实际 因此我需要使用遗传算法 GA 调用 method g 我需要包含随机效应 因此我使用 glmulti 作为 lme4 的包装器 此处提供
  • 如何在Rstudio中快速给几个单词加上引号?

    如何将 MI ID FL 转换为 MI ID FL 而无需键入每个双引号 Hmisc 包有一个函数 Cs 它将评估逗号分隔的文本是否带有引号 Cs MI ID FL becomes MI ID FL
  • R 改变构面的顺序

    我正在尝试将方面的顺序从 BA SLG 更改为 SLG BA 我发现了与此类似的问题 但我认为我的解决方案可能不起作用 因为我已经在Excel中汇总了数据 因此 我的数据框可能会有所不同 无论如何 我尝试实现这个但无济于事 df2 lt f
  • StatET调试工具

    我想我只是很密集 但我似乎无法弄清楚如何在 Eclipse 中的 R 中使用调试工具 StatET 插件 有人有关于这个主题的任何提示或教程吗 StatET 2 00 现在对高级 可视化调试提供实验性支持 需要 Eclipse 3 6 或
  • 我如何查看 quantmod 包中所有可用的数据系列?

    如何显示可用的所有报价 数据系列的列表 例如使用雅虎的 getSymbols 我不知道有什么办法 TTR包有一个功能 stockSymbols 下载 NYSE AMEX 和 NASDAQ 的所有当前代码 它试图将它们采用雅虎可接受的格式 但
  • 如何将参数从 Excel/VBA 传递到 Rstudio 中的脚本

    我正在尝试使用 Rstudio 从 VBA 打开 R 脚本 同时将参数传递给 R 脚本 然后我可以使用 commandArgs 访问该脚本 该问题与此处描述的问题非常相似 WScript Shell 用于运行路径中包含空格且来自 VBA 的
  • 获取包含矩阵行内最大值的列名称,该矩阵在数组内包含单独的最大值

    例如给出 dim1 lt c P PO C T dim2 lt c LL RR R Y dim3 lt c Jerry1 Jerry2 Jerry3 Q lt array 1 48 c 4 4 3 dimnames list dim1 di
  • 在 RGL 中将立方体绘制到 3D 散点图中

    我正在尝试向 3D 散点图添加较小的立方体 网格 具有指定边长 我希望立方体位于原点 我该怎么做呢 我已经玩过cube3d 但我似乎无法将立方体正确定位 也无法使其成为网格 因此我可以看到它包含的数据点 这是我所拥有的 library rg
  • 如何在R中分离两个图?

    每当我运行这段代码时 第一个图就会简单地覆盖前一个图 R中有没有办法分开得到两个图 plot pc title main abc xlab xx ylab yy plot pcs title main sdf xlab sdf ylab x
  • 更改ggplot2中的字体

    曾几何时 我改变了我的ggplot2字体使用windowsFonts Times windowsFont TT Times New Roman 现在 我无法摆脱这一切 在尝试设置family in ggplot2 theme 当我用不同的字

随机推荐

  • 递归中的全局变量。 Python

    好的 我正在使用 Python 2 7 3 这是我的代码 def lenRecur s count 0 def isChar c c c lower ans for s in c if s in abcdefghijklmnopqrstuv
  • 将基于 Vaadin 11 的 Maven 驱动项目更改为 Vaadin 12 alpha 版本?

    Problem 我有一个工作项目IntelliJ https en wikipedia org wiki IntelliJ IDEA2018 3 为Vaadin https en wikipedia org wiki Vaadin11 使用
  • 构造函数使用可选参数做奇怪的事情[重复]

    这个问题在这里已经有答案了 可能的重复 python 中最不令人惊讶的地方 可变的默认参数 https stackoverflow com questions 1132941 least astonishment in python the
  • 如何从 numpy 数组创建打乱的批处理列表以提供张量流字典

    我正在使用 Tensorflow 开发分类器 我的输入和输出是 numpy 数组 其中示例作为行 参数作为列 到目前为止 我的代码工作正常 我可以通过直接输入 100 的输入和输出数组来训练我的网络 现在 我想创建一个打乱批次的列表来提供张
  • RestKit JSON 空值崩溃

    我有这个问题 我正在 Swift 中开发应用程序 并使用 RestKit 检索数据并将数据发布回 API 然而我遇到了障碍 如果检索到的 JSON 负载包含一些空值 应用程序将崩溃并显示消息 由于未捕获的异常 NSInvalidArgume
  • 角度组件注入问题

    我目前在使用角度组件注入原理时遇到问题 我有一个标头组件 必须在另一个我称为 WelcomePage 组件 的组件中使用 我的目标是标头组件可以使用其父组件的方法和属性 为此 我创建了以下抽象类 export abstract class
  • DOMException:信号在异步调用的 useEffect 中无故中止

    我有一个在严格模式下使用 React 和 GraphQL 的项目 我更新了一些包 现在在包含异步调用的 useEffect 中收到以下错误 useEffect gt const loadTags async gt const data aw
  • Zeromq.node安装错误Ubuntu 12.04:'node-gyp重建'

    我正在尝试安装ZeroMQ节点 https github com JustinTulloss zeromq node using npm install zmq 但是 我不断收到以下错误 任何帮助将非常感激 gyp ERR build er
  • origin/master 和 master 有什么区别?

    有什么区别 基本上我想用 master 来 rebase 我的分支
  • Python smtplib sendmail() 不适用于主题/正文

    每当我尝试使用sendmail sender reciever message 它成功发送了电子邮件 并且主题行很好 但电子邮件的 正文 总是丢失 这是我的完整代码 s smtplib SMTP smtp gmail com 587 s e
  • Java 应用程序有办法检测屏幕是否锁定吗?

    我正在寻找一种方法来了解 Java 应用程序 withoutJNI 它是一个多平台应用程序 可以检测屏幕是否被锁定 仅供参考 我们的应用程序在用户工作时记录时间 我们希望它在屏幕锁定时自动停止记录 而不是用户必须明确地这样做 我认为没有一个
  • 如何使用ACR122U-A9进行卡模拟

    我有一个 ACR122U A9 我想用它进行卡模拟 请问谁做过这一点 你能给我一些建议吗 现在我还有其他问题 当我将白色智能卡放在这个 NFC 读卡器上时 LED 仅闪烁一次 但是当我把手机放在上面时 LED 总是闪烁 直到手机拔出 ACR
  • 使用 Sentiwordnet 3.0

    我计划使用 Sentiwordnet 3 0 进行情感分类 有人可以澄清一下 Sentiwordnet 中与单词相关的数字代表什么吗 例如排名 5 中的 5 是什么意思 另外对于 POS 来说 用来表示副词的字母是什么 我假设 a 是形容词
  • 数组 - foreach 带来 ->致命错误:无法使用类型的对象

    所以 我对这个数组很生气 第二天让我感到痛苦 我正在开发一个 OOP PHP 脚本 我得到一个数组 Array 0 gt Project Object project id gt 1 title gt Some Name date gt 2
  • 具有动态字段的 Angular Reactive Form

    我目前正在与 Angular 形式数组作斗争 我有一个动态添加字段的表单 我已经创建了表单对象 this otherDataForm this fb group 我添加了这样的动态字段 addField field CustomFormFi
  • 在C#中通过串口发送ctrl+C?

    How can I send my device ctrl c through serial port in C 串行端口不传输密钥 它们传输字节 通常是 字符的 ASCII 表示形式 Keys ControlKey Keys C 与感知
  • 在 Mongoid 中使用 AND 和 OR 的组合

    我想构造一个以下形式的查询 select from some table where field1 x or field2 y and field3 z or field4 w 通过阅读文档 我认为它应该看起来像这样Mongoid Some
  • Delphi:如何响应WM_SettingChange/WM_WinIniChange?

    我需要知道我的申请何时收到WM SETTINGCHANGE http msdn microsoft com en us library ms725497 v VS 85 aspx消息 以前称为WM WININICHANGE http msd
  • 怎么躲得过感叹号啊!在cmd脚本中?

    当我有setlocal ENABLEDELAYEDEXPANSION在cmd脚本中设置有什么方法可以逃脱 我想用作命令的参数 echo off setlocal ENABLEDELAYEDEXPANSION echo I want to g
  • R studio 4.0 上的 easi 包

    easi 包 精确仿射石索引模型 有点旧 但对我的目的仍然有用 考虑到它是基于 R 2 15 3 构建的 有人设法将它安装在 Rstudio 4 上吗 谢谢 我分叉了 github 存储库并更新了源代码以修复Error in class f