Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Author

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