[ncl-talk] regarding multi linear regression analysis

Dennis Shea shea at ucar.edu
Wed Jun 28 09:25:17 MDT 2017


re: "very new to NCL"  :   ===> Welcome to NCL-land!

NCL is focused upon scientific data processing and visualization. NCL does
provide some basic statistical functions for some commonly performed
statistics:

   http://www.ncl.ucar.edu/Document/Functions/statistics.shtml
and/or
   https://www.ncl.ucar.edu/Document/Functions/math.shtml

However, NCL is not the 'R' language (public domain) or 'Matlab'
(commercial). These are likely better tools for sophisticated/robust
statistical applications.

---
That said ...

I am not sure I understand your objective. You have

[1] "I am having 3d dependent variable which is in latitude, longitude and
time"
     Y(time,lat,lon)

[2] "3 independent 1d time series variables (X1, X2, X3)"
     X1(time),  X2(time), X3(time)

If you are looking at a particular location for the Y variable

    LAT =  25.0
    LON = 90.0

    YTS = Y(:,{LAT},{LON})  ===> YTS(time)

===

       N  = *dimsizes*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/dimsizes.shtml>(YTS)
       M  = 3
                                                  ; create independent array
       X  = *new*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/new.shtml> (
(/M+1,N/), "float" )
       X(0,:) = 1.0                           ; constant term on rhs
       X(1,:) = X1
       X(2,:) = X2
       X(3,:) = X3

       beta = *reg_multlin* (YTS,X,False)
       *print* <https://www.ncl.ucar.edu/Document/Functions/Built-in/print.shtml>(beta)










On Sat, Jun 24, 2017 at 6:57 PM, saurabh rathore <rohitsrb2020 at gmail.com>
wrote:

> Hi,
> I am very new to NCL uses and I want to do multi linear regression
> analysis. I am having 3d dependent variable which is in latitude, longitude
> and time i.e. (Y) and 3 independent 1d time series variables (X1, X2, X3).
> so I want to perform multi linear regression analysis from these variable.
> But I am under confident in doing this. can anyone help me out for this
> analysis.
> I went through the link http://www.ncl.ucar.edu/
> Document/Functions/Built-in/reg_multlin.shtml but it seems it is only for
> 1d variables. is this the correct way to do this for 3d variables
> https://www.ncl.ucar.edu/Support/talk_archives/2012/3034.html ?
>
> any help will be highly appreciated.
>
> regards, saurabh
>
> --
>
>
> *REGARDS*
>
> *Saurabh Rathore*
> *Research Scholar (PhD.)*
> *Centre For Oceans, Rivers, Atmosphere & Land Science Technology*
> *Indian Institute Of Technology, Kharagpur*
> *contact :- 91- 8345984434*
>
> _______________________________________________
> 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/20170628/aee555aa/attachment.html 


More information about the ncl-talk mailing list