The Spearman Rank Correlation Test (Numerical Example)

Consider the following data for the illustration of the detection of heteroscedasticity using the Spearman Rank correlation test. The Data file is available to download.

YX2X3
11208.1
16188.4
11228.5
14218.5
13278.8
17269
14258.9
15279.4
12309.5
18289.5

The estimated multiple linear regression model is:

$$Y_i = -34.936 -0.75X_{2i} + 7.611X_{3i}$$

The Residuals with the data table are:

YX2X3Residuals
11208.1-0.63302
16188.40.575564
11228.5-2.16954
14218.50.076455
13278.81.317102
172693.040825
14258.90.047951
15279.4-1.2497
12309.5-2.74881
18289.51.743171

We need to find the rank of absolute values of $u_i$ and the expected heteroscedastic variable $X_2$.

$Y$$X_2$$X_3$ResidualsRank of |$u_i$|Rank of $X_2$$d$$d^2$
11208.1-0.633 4224
16188.40.576 3124
11228.5-2.170 84416
14218.50.076 23-11
13278.81.317 67.5-1.52.25
172693.041 106416
14258.90.048 15-416
15279.4-1.250 57.5-2.56.25
12309.5-2.749 910-11
18289.51.743 79-24
       Total =070.5

Calculating the Spearman Rank correlation

\begin{align}
r_s&=1-\frac{6\sum d^2}{n(n-1)}\\
&=1-\frac{6\times 70.5)}{10(100-1)}=0.5727
\end{align}

Let us perform the statistical significance of $r_s$ by t-test

\begin{align}
t&=\frac{r_s \sqrt{n}}{\sqrt{1-r_s^2}}\\
&=\frac{0.5727\sqrt{8}}{\sqrt{1-(0.573)^2}}=1.977
\end{align}

The value of $t$ from the table at a 5% level of significance at 8 degrees of freedom is 2.306.

Since $t_{cal} \ngtr t_{tab}$, there is no evidence of the systematic relationship between the explanatory variables, $X_2$ and the absolute value of the residuals ($|u_i|$) and hence there is no evidence of heteroscedasticity.

Since there is more than one regressor (the example is from the multiple regression model), therefore, Spearman’s Rank Correlation test should be repeated for each of the explanatory variables.

Spearman Rank Correlation

As an assignment perform the Spearman Rank Correlation between |$u_i$| and $X_3$  for the data above. Test the statistical significance of the coefficient in the above manner to explore evidence about heteroscedasticity.

Read about Pearson’s Correlation Coefficient

R Language Interview Questions

How to Fix Instagram Story Video Quality Blurry Problem

The quality of your video is too bad after uploading to Instagram Story? In this article, we will tell you why the video on Instagram Story is blurry, and how to fix Instagram story video quality.

FlexClip: Fix Instagram Story Video Quality

If you are a longtime Instagram user, you will realize the importance of video/ photo quality on Instagram. However, on social networks, you see a lot of people complaining about topics like this.

“My videos became of poor quality after uploading them to Instagram. There is no problem with the video. Why and how do I fix this problem? ”

Poor quality video on Instagram Stories can occur for many reasons, including Internet connection, and app version. Whatever it is, the problem of poor-quality Instagram story videos is not difficult to solve. Follow the methods below and say no to blurred Instagram video stories. The methods below can be used to fix Instagram story video quality.

Ways to Fix Instagram Story Video Quality Problem

1. Check Internet connection

If your Internet connection is unstable, uploaded Instagram videos may be blurred because they have not been fully loaded. While you are uploading a video to Instagram with a poor Internet connection, Instagram will automatically reduce the quality of the video for upload. Try to connect your device with a stable WIFI adapter to mobile data.

2. Try different videos and images

Recovered your phone from a backup? Try a different video or photo. The clarity of photos and videos can change in the damaged backup.

3. Reset network settings

On an iPhone, to reset network settings, you have to go to Settings> General> Reset> Reset Network Settings. On an Android phone, you need to go to Settings> Backup and reset> Reset Network Settings.

4. Adjust camera settings

When your phone is unable to record high-quality video, here’s what you do to adjust your phone camera settings.

On Android:

Step 1:  Open the default Camera app on your phone.

Step 2:  Click the Settings icon shaped like a gear icon.

Step 3:  Adjust the image and video size to the highest quality.

On iPhone:

Step 1  Launch the iPhone Settings app on your phone.

Step 2  Find Camera.

Step 3  Adjust camera quality and turn on “Automatic DHR”.

5. Picture and video size is not the correct aspect ratio

Instagram limits the size and quality of the photos and videos you upload. If you’re uploading a video or photo that’s too large, Instagram compresses it so your video loads faster. One solution is to not use the phone’s camera. Use Instagram’s camera instead. No cuts and no quality loss.

6. Update the application

When you’re on an older version of Instagram, Instagram Story videos may appear worse. Update it so you can enjoy your new Instagram journey.

7. Adjust Instagram settings

Instagram burns your mobile data. To prevent you from misusing your data, Instagram gives you a setting to keep your mobile data usage to a minimum. This will dramatically decrease the quality of your Instagram feed. Here’s what you do to disable this setting.

Step 1:  Launch Instagram and tap on your profile icon.

Step 2:  Click on the three horizontal lines.

Step 3:  Go to Settings> Accounts> Cellular Data Usage.

Step 4:  Turn off Data Saver.

8. Use a photo/video editing app

Instagram has certain requirements for videos and photos. If the video you want to upload doesn’t meet the requirements, Instagram will automatically trim or compress it.

Lots of video editors like FlexClip help you crop and compress videos to fit Instagram story format without losing video quality. In clicks, you can adjust the aspect ratio, video length, and video size.

Moreover, it also gives you other video editing tools for video upscaling, like transitions, filters, and video speed changers. Last but not least, FlexClip has a ton of media resources that you can apply, including video clips, photos, music, and even royalty-free pre-made video templates.

FlexClip: Fix Instagram Story Video

Conclude

With 8 solutions to poor-quality video processing on Instagram stories, you will no longer experience blurred Instagram video stories! Share this post if you found it helpful to fix Instagram story video quality.

Convert Documents to PDF, doPDF

R Programming Language

White General Heteroscedasticity Test (Numerical) 2021

One important assumption of Regression is that the variance of the Error Term is constant across observations. If the error has a constant variance, then the errors are called homoscedastic, otherwise heteroscedastic. In the case of heteroscedastic errors (non-constant variance), the standard estimation methods become inefficient. Typically, to assess the assumption of homoscedasticity, residuals are plotted.

Read about Heteroscedasticity Consequences in detail.

white general heteroscedasticity test https://itfeature.com

We will consider the following data, to test the presence of heteroscedasticity using White General Heteroscedasticity test.

IncomeEducationJob Experience
529
9.7418
28.4821
8.8812
21814
26.61016
25.41216
23.1129
22.51218
19.5125
21.7127
24.8139
30.11412
24.81417
28.51519
26156
38.91617
22.1161
33.11710
48.32117

White General Heteroscedasticity Test

To perform the White General Heteroscedasticity test, the general procedure is

Step 1: Run a regression and obtain $\hat{u}_i$ of this regression equation.

The regression model is: $income = \beta_1+\beta_2\, educ + \beta_3\, jobexp + u_i$

The Regression results are: $Income_i=-7.09686 + 1.93339 educ_{i} + 0.649365 jobexp_{i}$

Step 2: Run the following auxiliary regression

$$\hat{u}_i^2=\alpha_1+\alpha_2X_{2i}+\alpha_3 X_{3i}+\alpha_4 X_{2i}^2+\alpha_5X_{3i}^2+\alpha_6X_{2i}X_{3i}+vi $$

that is, regress the squared residuals on a constant, all the explanatory variables, the squared explanatory variables, and their respective cross-product.

Here in auxiliary regression education, $Y$ is income, $X_2$ is educ, and $X_3$ is jobexp.

The results from auxiliary regression are:

$$Y=42.6145  -0.10872\,X_{2i} – 5.8402\, X_{3i} -0.15273\, X_{2i}^2 + 0.200715\, X_{3i}^2 + 0.226517\,X_{2i}X_{3i}$$

Step 3: Formulate the null and alternative hypotheses

$H_0: \alpha_1=\alpha_2=\cdots=\alpha_p=0$

$H_1$: at least one of the $\alpha$s is different from zero

Step 4: Reject the null and conclude that there is significant evidence of heteroscedasticity when the statistic is bigger than the critical value.

The statistic with computed value is:

$$n \cdot R^2 \, \Rightarrow = 20\times 0.4488 = 8.977$$

The statistics follow asymptotically $\chi^2_{df}$, where $df=k-1$. The Critical value is $\chi^2_5$ at a 5% level of significance is  11.07. 

https://itfeature.com

Since the calculated value is smaller than the tabulated value, therefore, the null hypothesis is accepted. Therefore, based on the White general heteroscedasticity test, there is no heteroscedasticity.

Download the data file: White’s test Related Data

Online MCQs Quiz Website