Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

How to use regression coefficient?

I am inexperienced with regression (OLS is fine) in QlikView but would like to use regression coefficient values to produce a regression control chart.

I could accomplish this by either returning a coefficient as a value in an expression or by saving a coefficient as a variable to use elsewhere. 

Any help would be much appreciated!

1 Reply
Not applicable

Re: How to use regression coefficient?

Hi Matt

Qlikview has some regression functions (check out the ones beggining "LINEST..", but be aware that they are limited to linear only, not multiple.

The function for returning the coefficient for 2 fields is: linest_m(y,X)

So you could use this like

=linest(COPD_Rates,Smoking_Rates) to look at the relationship between smoking rates and copd (emphysema rates)

Most people's data isn't this straight forward and you can use it in conjunction with aggr to compare grouped results, eg

=linest_m(aggr(sum(sales),Salesperson),aggr(sum(Days_worked),Salesperson))

Other useful functions that work in the same way:

Linest_b : intercept

Linest_r2: correlation squared

I personally prefer to do the regression in another program (eg R or SPSS) and import the results into QlikView if it's anything more complex than the above!

Hope this helps,

Erica

Community Browser