Hello
I have been given an Excel file which has a logistic outcome variable (AR, label "Was the scheduled PRO completed electronically") which came across to Stata from Excel as a string variable. I have tried to encode it to a numeric variable (called "eprocom") which seems to look ok in the dataset but Stata keeps saying "the outcome does not vary" even if I put it in a model with no predictors, whcih shouldn't be affected by missing values in the independent variables.
If you look at how dataex captures the variable, it's doing something funny and storing it as all 2's for some reason-a problem with labelling somehow which I have not requested.
When I tabulate my "eprocom" variable it makes sense:
But I can't use the variable in models without the "outcome does not vary" error message.
Not sure what is going on here.
Help appreciated and thanks in advance.
Regards
Chris
I have been given an Excel file which has a logistic outcome variable (AR, label "Was the scheduled PRO completed electronically") which came across to Stata from Excel as a string variable. I have tried to encode it to a numeric variable (called "eprocom") which seems to look ok in the dataset but Stata keeps saying "the outcome does not vary" even if I put it in a model with no predictors, whcih shouldn't be affected by missing values in the independent variables.
If you look at how dataex captures the variable, it's doing something funny and storing it as all 2's for some reason-a problem with labelling somehow which I have not requested.
Code:
* Example generated by -dataex-. For more info, type help dataex clear input byte WasthescheduledPROcompleted str85 IfPRONOTcompletedreasonpro str1 AR str127 IfNOTcompletedelectronically long eprocom 1 "." "0" "Not technologically confident to use the app/difficulty with using the app" 2 1 "." "0" "Not technologically confident to use the app/difficulty with using the app" 2 1 "." "0" "Not technologically confident to use the app/difficulty with using the app" 2 1 "." "0" "More convenient for participant" 2 1 "." "0" "More convenient for participant" 2 1 "." "0" "More convenient for participant" 2 1 "." "0" "Participant does not have the required device to install the app" 2 1 "." "0" "Participant does not have the required device to install the app" 2 1 "." "0" "NO EPROS" 2 1 "." "0" "NO EPRO" 2 1 "." "0" "More convenient for participant" 2 1 "." "0" "Participant does not have the required device to install the app" 2 1 "." "0" "Internet connection/availability problems" 2 1 "." "0" "More convenient for participant" 2 1 "." "0" "More convenient for participant" 2 1 "." "0" "PT REQUIRED INTERPRETER TO ANSWERE QUESTIONS" 2 1 "." "0" "PT REQUIRED AN INTERPRETER TO COMPLETE" 2 1 "." "0" "More convenient for participant" 2 1 "." "0" "Participant does not have the required device to install the app" 2 1 "." "0" "More convenient for participant" 2 end label values eprocom eprocom label def eprocom 2 "0", modify
Was the | |||
scheduled | |||
PRO | |||
completed | |||
electronica | |||
lly? | Freq. | Percent | Cum. |
. | 410 | 23.10 | 23.10 |
0 | 1,320 | 74.37 | 97.46 |
1 | 45 | 2.54 | 100.00 |
Total | 1,775 | 100.00 |
Not sure what is going on here.
Help appreciated and thanks in advance.
Regards
Chris
Comment