[R-sig-Geo] "Zelig" function for Logistic regression
Omar Faisel
omaralthwaini at yahoo.com
Tue Sep 12 12:21:42 CEST 2017
Dear All,
I have misleadings with "Zelig" function to process the data with Logistic regression.
Here is a glance at my data> head(data.variables, n=4) target F1 F2 F3 F41 1 103.6462 13.460189 15 52 1 1138.1763 14.049833 15 53 1 731.0000 8.321724 10 54 1 335.6171 21.928064 9 5
> cross.classification.lrm<-table(as.numeric(result.lrm$y),round(result.lrm$fitted.values),dnn=c("Observed","Predicted"))
Error in envRefInferField(x, what, getClass(class(x)), selfEnv) : ‘y’ is not a valid field or method name for reference class “Zelig-logit”
Here is the function >result.lrm<-zelig(as.formula(paste(names(data.variables)[1],"~",paste(names(data.variables[,2:dim(data.variables)[2]]),collapse= "+"))), data=data.variables, model="logit")
Here the output names> names(result.lrm)1] "vignette.url" "simx1" "summarise" [4] "zelig#Zelig" "setx.labels" "bootstrap" [7] "bsetrange" "initialize" "show#Zelig" [10] "name" "mcfun" "year" [13] "simx" "callSuper" "range" [16] "signif.stars" "packageauthors" "get_qi" [19] "range1" "param" "zelig.out" [22] "sim.out" "acceptweights" "setrange" [25] "json" "qi" "url" [28] "get_names" "packagename" "from_zelig_model" [31] "initialize#Zelig-glm" "family" "get_df_residual" [34] "signif.stars.default" "linkinv" "num" [37] "originaldata" "buildDataByWeights2" "setforeveryby" [40] "refs" "show#envRefClass" "sim" [43] "cite" "toJSON" "get_se" [46] "setx" "getRefClass" "model.call" [49] "graph" "import" "weights" [52] "copy" "simrange1" "export" [55] "show" "bsetx1" "simparam" [58] "matched" "initFields" "zeligauthors" [61] "data" "get_coef" "category" [64] "by" "get_pvalue" "description" [67] "mcunit" "getClass" "initialize#Zelig" [70] "zelig" "usingMethods" "test.statistics" [73] "help" "mcformula" "outcome" [76] "get_predict" "buildDataByBootstrap" "bsetx" [79] "get_fitted" "initialize#Zelig-binchoice" "bsetrange1" [82] "trace" "get_model_data" "avg" [85] "get_residuals" "mi" "references" [88] "modelauthors" "originalweights" "zelig.call" [91] "link" "feedback" "summarize" [94] "setx.out" "formula" "simrange" [97] "simATT" "ATT" "bootstrap.num" [100] "idx" "get_vcov" "untrace" [103] "set" "fn" "mcfun#Zelig" [106] "buildDataByWeights" "url.docs" "with.feedback" [109] "field" "setx1" "setrange1" [112] "authors" "ljson" "explanatory" [115] "wrapper" "mcunit.test"
for the predicted values, I used fitted(results.lrm), it works no problem."
I noticed there is no result called the logit function "y"
But my question: what is the value that can be used instead of "Y"?
Thank you,
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list