[ncl-talk] missing values in reg_multlin_stats

Dennis Shea shea at ucar.edu
Wed Jan 10 19:55:39 MST 2018


The "reg_multlin_stats" documentation

http://www.ncl.ucar.edu/Document/Functions/Contributed/reg_multlin_stats.shtml
does state that but the code (located in contributed.ncl)  has:

undef ("reg_multlin_stats")
function reg_multlin_stats(Y[*]:numeric, XP:numeric, opt) ; should be float
or double
;
; Nomenclature:
; Y     - dependent variable (size NY)
;         missing values (_FillValue) are not allowed.   <=============
; XP    - one [*] or more [*][*] independent variables.
;         Missing values (_FillValue) are not allowed.    <=============

[snip]

       if (isatt(Y,"_FillValue")  .and. any(ismissing(Y))) then
           print("reg_multlin_stats: Y has missing values. Not allowed!")
           exit
       end if

       if (isatt(XP,"_FillValue") .and. any(ismissing(XP))) then
           print("reg_multlin_stats: XP has missing values. Not allowed!")
           exit
       end if
[snip]
==========

Still, there might be a way to use the function. My thought is to manually
loop ove ?grid points? skipping any points that have missing values.

How are you using it? Please be clear and concise.

I am gone through 22 Jan 2018 so maybe someone else can help.









On Wed, Jan 10, 2018 at 4:00 PM, Anahita Amiri Farahani via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Dear all,
>
> I wanted to use reg_multlin_stats to calculate linear regression between
> low cloud and stability, the low cloud and stability are my dependent and
> independent variables. Stability is calculated based on the potential
> temperature at the surface and 700 hPa. So we have missing values for some
> areas. When I read the description of this function, it says While
> missing values are allowed, it is recommended that users not input any
> missing independent values. It just confuses the results. Missing values
> should be indicated by the _FillValue
> <https://www.ncl.ucar.edu/Document/Language/fillval.shtml> attribute.
>
>
> But when I use this function I got this error: reg_multlin_stats: XP has
> missing values. Not allowed!
>
> and it popped out from NCL, Any suggestions?
>
> Thanks,
> Ana
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180110/0d935018/attachment.html>


More information about the ncl-talk mailing list