0% found this document useful (0 votes)
69 views6 pages

Allison

The document describes analyzing data from Allison and her mother to assess depression and arguments. For Allison's daily crying data: 1) There was a significant linear trend, suggesting her crying decreased over time. 2) There was slight autocorrelation but no trend, so the data may not be stationary. 3) Given the above, the appropriate test of type 1 error would be a t-test.

Uploaded by

Minza Jahangir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views6 pages

Allison

The document describes analyzing data from Allison and her mother to assess depression and arguments. For Allison's daily crying data: 1) There was a significant linear trend, suggesting her crying decreased over time. 2) There was slight autocorrelation but no trend, so the data may not be stationary. 3) Given the above, the appropriate test of type 1 error would be a t-test.

Uploaded by

Minza Jahangir
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

1. Open the The Allison Data. Allison is a teenager that you are seeing for depression.

In order to assess her progress, you ask her to record how many times she cries each day.
The data you have is a measure of that.

a. Test for a trend in each phase and report your findings.

The function "notrend_test" assesses the null hypothesis of the absence of a trend against various
alternatives determined by their corresponding tests.

We have used a t-test to evaluate the following set of hypotheses:


H0: There is no trend.
H1: There is a linear trend

Sieve-bootstrap Student's t-test for a linear trend

data: cry
Student's t value = -4.9791, p-value < 2.2e-16
alternative hypothesis: linear trend.
sample estimates:
$AR_order
[1] 0

$AR_coefficients
numeric(0

The fact that the p-value is large accurately suggests that there is adequate evidence to reject the
notion of no trend in X0 and instead accept the alternative hypothesis of a linear trend.

b. Test for autocorrelation in each phase and report your findings.


The histogram of cry shows that the data is right skewed.
Autocorrelation gauges the connection between the present value of a variable and its previous
values. A value of +1 for autocorrelation indicates a complete positive correlation, whereas a
value of -1 indicates a complete negative correlation. There is a slight downward trend, so the
series may not be stationary. For a positive value of, the ACF exponentially decreases to 0 as the
lag Increases Likewise, the data has not trend because it has positive values are not slowly
decreasing as the lags increase .

c. With this information, which test of Type I error would you use?

> mean (cry)


[1] 1.607843
> median (cry)
[1] 1
> Mode <- function(x) {
+ ux <- unique(x)
+ ux[which.max(tabulate(match(x, ux)))]
+}
> Mode (cry)
[1] 0
> hist(cry, freq = T, main = "No. t-tests before Type I Error",
+ xlim=c(0,60), col = rgb(.2,.2,.8,.5), border = F,
+ cex.axis=.75, cex.main=.9, xlab="", ylab="")

> t1err=0
> n=51 # testing 10,000 times
> for (i in 1:n){
+ x=rnorm(100, 0, 1)
+ if (((t.test(x, mu=0))$p.value)<=0.05) (t1err=t1err+1)
+}
> cat("Type I error rate in percentage is", (t1err/n)*100,"%")
Type I error rate in percentage is 1.960784 %
Now open the Mother's file Mother is a client you are seeing in family therapy
who is arguing with her teenage daughter. The data you have is how many
arguments she has each month with her daughter?
Evaluate the Mother data in the same way you evaluated the Allison data.
1. Test for a trend in each phase and report your findings.

Sieve-bootstrap Student's t-test for a linear trend

data: cry
Student's t value = -4.9791, p-value < 2.2e-16
alternative hypothesis: linear trend.
sample estimates:
$AR_order
[1] 0

$AR_coefficients
numeric(0)

Test for autocorrelation in each phase and report your findings.


With this information, which test of Type I error would you use?
Type I error refers to the probability of rejecting the null hypothesis when it is actually true,
whereas Type II error refers to the probability of not rejecting the null hypothesis when it is
actually false.

𝐻0:𝜇=0.

𝐻1:𝜇≠0 or 𝜇>0 or 𝜇<0,

As the p-value is less than 0.05, we reject the null hypothesis

You might also like