|
Hi SPSS users,
I am using SPSS java plugin and run a generalized linear mixed model. I wan to get the output of the AIC from the generated output. I am not sure what is the xpath of for getting this value? Can anyone help me write that? |
|
This should do it, assuming that your OMS
request selected just the Goodness of Fit table (oms select tables /if
subtypes='GoodnessOfFit'...)
//category[@text="Akaike's Information Criterion (AIC)"]//cell/@number Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: Luckyluke <[hidden email]> To: [hidden email] Date: 07/29/2015 07:09 AM Subject: [SPSSX-L] Accessing the xpath for generlized mixed model using SPSS java plugin Sent by: "SPSSX(r) Discussion" <[hidden email]> Hi SPSS users, I am using SPSS java plugin and run a generalized linear mixed model. I wan to get the output of the AIC from the generated output. I am not sure what is the xpath of for getting this value? Can anyone help me write that? -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Accessing-the-xpath-for-generlized-mixed-model-using-SPSS-java-plugin-tp5730302.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
|
Hi Jon,
Thanks for the reply. I am trying to write the code as follow: [code] String[] command={"GET FILE='E:/Users/Mehdi/Downloads/patientanalysis10.sav'.", "SET ODISPLAY=tables.", "GENLINMIXED", " /DATA_STRUCTURE SUBJECTS=DRG", " /FIELDS TARGET=TrueAdverseEvents TRIALS=NONE OFFSET=NONE", " /TARGET_OPTIONS DISTRIBUTION=BINOMIAL LINK=LOGIT", " /FIXED EFFECTS=DayofWeek Sex AdmissionSource Charlson1 Age DRGCostWeight NumberOfProcedures", " DischargeStatus Number_Of_Discharges Percentage_Of_Emergency_Admissions", " Number_Of_Surgical_admissions Number_Of_Medical_admssions NumberofPatientseachday", " AverageDRGCostWeightEachDay AverageNursingDRGCostEachDay USE_INTERCEPT=TRUE", " /RANDOM EFFECTS=Number_Of_Discharges Percentage_Of_Emergency_Admissions", " Number_Of_Surgical_admissions Number_Of_Medical_admssions NumberofPatientseachday", " AverageDRGCostWeightEachDay AverageNursingDRGCostEachDay USE_INTERCEPT=FALSE SUBJECTS=DRG", " COVARIANCE_TYPE=VARIANCE_COMPONENTS", " /BUILD_OPTIONS TARGET_CATEGORY_ORDER=ASCENDING INPUTS_CATEGORY_ORDER=ASCENDING MAX_ITERATIONS=100", " CONFIDENCE_LEVEL=95 DF_METHOD=RESIDUAL COVB=MODEL PCONVERGE=0.000001(ABSOLUTE) SCORING=0", " SINGULAR=0.000000000001", " /EMMEANS_OPTIONS SCALE=ORIGINAL PADJUST=LSD."}; StatsUtil.submit(command); String handle = "desc_table"; String context ="/outputTree"; String xpath1 = "//category[@varName='salary']//category[@text='Mean']/cell/@text"; String result = StatsUtil.evaluateXPath(handle, context, xpath1); StatsUtil.deleteXPathHandle(handle); [/code] But I am not sure how to use StatsUtil.evaluateXPath as it needs a handle and context.. Can you help me do that? Thanks |
|
You need to issue an OMS command which
specifies the handle and what to write to the XMLWORKSPACE before running
GENLINMIXED.
Jon Peck (no "h") aka Kim Senior Software Engineer, IBM [hidden email] phone: 720-342-5621 From: Luckyluke <[hidden email]> To: [hidden email] Date: 08/28/2015 07:19 AM Subject: Re: [SPSSX-L] Accessing the xpath for generlized mixed model using SPSS java plugin Sent by: "SPSSX(r) Discussion" <[hidden email]> Hi Jon, Thanks for the reply. I am trying to write the code as follow: [code] String[] command={"GET FILE='E:/Users/Mehdi/Downloads/patientanalysis10.sav'.", "SET ODISPLAY=tables.", "GENLINMIXED", " /DATA_STRUCTURE SUBJECTS=DRG", " /FIELDS TARGET=TrueAdverseEvents TRIALS=NONE OFFSET=NONE", " /TARGET_OPTIONS DISTRIBUTION=BINOMIAL LINK=LOGIT", " /FIXED EFFECTS=DayofWeek Sex AdmissionSource Charlson1 Age DRGCostWeight NumberOfProcedures", " DischargeStatus Number_Of_Discharges Percentage_Of_Emergency_Admissions", " Number_Of_Surgical_admissions Number_Of_Medical_admssions NumberofPatientseachday", " AverageDRGCostWeightEachDay AverageNursingDRGCostEachDay USE_INTERCEPT=TRUE", " /RANDOM EFFECTS=Number_Of_Discharges Percentage_Of_Emergency_Admissions", " Number_Of_Surgical_admissions Number_Of_Medical_admssions NumberofPatientseachday", " AverageDRGCostWeightEachDay AverageNursingDRGCostEachDay USE_INTERCEPT=FALSE SUBJECTS=DRG", " COVARIANCE_TYPE=VARIANCE_COMPONENTS", " /BUILD_OPTIONS TARGET_CATEGORY_ORDER=ASCENDING INPUTS_CATEGORY_ORDER=ASCENDING MAX_ITERATIONS=100", " CONFIDENCE_LEVEL=95 DF_METHOD=RESIDUAL COVB=MODEL PCONVERGE=0.000001(ABSOLUTE) SCORING=0", " SINGULAR=0.000000000001", " /EMMEANS_OPTIONS SCALE=ORIGINAL PADJUST=LSD."}; StatsUtil.submit(command); String handle = "desc_table"; String context ="/outputTree"; String xpath1 = "//category[@varName='salary']//category[@text='Mean']/cell/@text"; String result = StatsUtil.evaluateXPath(handle, context, xpath1); StatsUtil.deleteXPathHandle(handle); [/code] But I am not sure how to use StatsUtil.evaluateXPath as it needs a handle and context.. Can you help me do that? Thanks -- View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Accessing-the-xpath-for-generlized-mixed-model-using-SPSS-java-plugin-tp5730302p5730528.html Sent from the SPSSX Discussion mailing list archive at Nabble.com. ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD ===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD |
| Free forum by Nabble | Edit this page |
