Flag missing information for individual variable
Creates a new variable in the form of a dummy variable for a variable that contains a missing value, which identifies the missing information for that variable
In SPL, A.mi()and P.mi() can automatically generate a dummy variable to flag the missing information
For example, mark the missing values in titanic.csv:
A |
|
1 |
=file("D://titanic.csv").import@qtc() |
2 |
=A1.mi("Age") |
3 |
=A1.fname() |
4 |
=A3.(A1.mi(~)) |
A2 An MI_Age variable is automatically generated to flag if Age is missing
Note: Before the MI variable is generated, the mi() function will calculate the missing rate of the variable. When the missing rate is less than 5% or greater than 95%, the MI variable is not generated, but null is returned
A4 Flag the missing information for all fields, you can see that only the 6th and 11th fields generate the MI indicator variable, the others return null.
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProc_SPL
SPL Learning Material 👉 https://c.scudata.com
SPL Source Code and Package 👉 https://github.com/SPLWare/esProc
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProc_SPL