Home Coursework Help WhatsApp Us About us

Use SPSS to produce a scatterplot of maths scores
Multilevel modelling assignment question
This coursework accounts for 10% of the total mark for the portfolio. In addition to the combined marks for each of the portfolio tasks, you will also be graded on the structure, presentation and clarity of the portfolio as a whole. So your work should be professionally presented, with good use of English.
In the real world, you will be expected to communicate the results from a statistical analysis you perform to non-statisticians, so you should conclude each task with a brief explanation of your results, presented in terms a layperson would understand.

Assignment description
This task is in the form of a tutorial based on Heck, Thomas and Tabata (2010). It will take you, step-by-step, through the process of building a multilevel model to explore the effect of socioeconomic status and school attended on the maths scores for a sample of American school students.
The data are presented in the file Mathscores.sav. This task must be performed using SPSS.
The file contains data for 6871 students attending 419 schools.
School identification code, numbered 1 to 419
Identification of each student within each school (non=unique)
Unique identifier for each student
Standardised score on socio-economic index. This means that the scores have been standardised to a mean of zero and s.d. of 1. Therefore zero represents the brand mean socio-economic status across all students represented, and a unit difference represents a difference of 1 standard deviation.
The overall percentage scores of each student in a standard maths test. The next three variables are indicators of difference between the schools, and so may be used to explain any random effects we observe.
The mean of the standardised socio-economic scores within the sample from each school
The percentage of students planning to take a four-year university course after leaving within each school
Whether the school is public (1) or private (0). Note that this is the American meaning of public school, so equivalent to a British state school.

Use SPSS to produce a scatterplot of maths scores against socio-economic status using only the first 80 observations. Modify plot to add a regression line.

Hint: use Data Select Cases Based on time or case range What does this suggest about the nature of the relationship between these two variables? [2 marks]

Remove the cases selection and perform a simple regression analysis to show the effect of the socio-economic status on maths scores for all of the students in the sample.

What do the results indicate? How strong is this model?
Based on the standard regression assumptions, explain why the simple regression model may not be valid. [3 marks]
Reproduce the scatterplot (using the subset of 80 students), but this time, set markers by schcode, and add best fit lines for each school represented.

Hint: use the Add Fit Line at Subgroups option.
Use this plot to explain why multilevel modelling may be a better way of analysing this data. [3 marks]
8 marks total for Part 1
Remember to remove the case selection before moving on to the next part.

Null model random intercepts, no predictors

In this part we will build a model to show how allowing random intercepts for the different schools allows us to build a more appropriate model.

Select Analyze  Mixed Models  Linear.
Add schcode to the Subjects window. Continue. Select math as your dependent variable but don’t add any predictors.
Click the Random… button. Check that Variance Components is selected (otherwise we will also have random slopes), and an intercept is included. Add schcode to the Combinations box. Continue.

Click the Estimation button and select Maximum Likelihood. This is necessary for comparing nested models – we cannot do this if we use the default restricted ML. Continue.
Click the Statistics button and select Parameter estimates, Tests for covariance parameters, and Covariances of random effects. Continue.

Click OK.
Note the deviance and number of parameters. [1 mark]
What effect has this had on the estimate of the fixed (overall) intercept in comparison with the regression model? [1 mark]

The Estimates of Covariance Parameters table details tests for within group effects (called Residual) and the between groups effect (Intercept).

Given the null hypotheses of “no effect”, interpret these results in the context of the
data. [2 marks]

Sample assignment on R statistics help

Answer all questions. Marks are indicated beside each question. You should submit your solutions before the
You should submit both
• a .pdf file containing written answers (word processed, or hand-written and scanned), and
• an .R file containing R code.
For all answers include
• the code you have written to determine the answer, the relevant output from this code, and a justification of how you got your answer.
• Total marks: 60 1. Consider the one parameter family of probability density functions

fb     for − b ≤ x ≤ b

where b > 0.
(a) Write R code to plot this pdf for various values of b > 0. [2 marks]
(b) Determine the method of moments estimator for the parameter b. (No R code necessary) [4 marks]
(c) Determine the Likelihood function for the parameter b. By writing R code to plot a suitable graph, determine that the derivative of this likelihood function is never zero. [4 marks] (d) Hence find the Maximum Likelihood Estimator for the parameter b. (No R code necessary) [4 marks] (e) The data in the file Question 1 data.csv contains 100 independent draws from the probability distribution with pdf fb(x), where the parameter b is unknown. Load the data into R using the command
D <- read . csv (path_to_f i l e )$x
where path_to_file indicates the path where you have saved the .csv file
e.g. path_to_file = “c:/My R Downloads/Question 1 data.csv”
Note that forward slashes are used to indicate folders (this is not consistent with the usual syntax for Microsoft operating systems).
Write R code to calculate an appropriate Method of Moments Estimate and a Maximum Likelihood Estimate for the parameter b, given this data. [4 marks]

  1. The data in the file Question 2 data.csv is thought to be a realisation of Geometric Brownian Motion
    St = S0eσWt+µt
    where Wt is a Wiener process and σ,µ and S0 are unknown parameters. Load the data into R using the command
    S <- read . csv (path_to_f i l e )
    where path_to_file indicates the path where you have saved the .csv file.
    (a) Write R code to determine the parameter S0. [2 marks]
    (b) Write R code to determine if Geometric Brownian Motion is suitable to model this data.
    You may do this by
    • plotting an appropriate scatter plot/histogram, and/or • using an appropriate statistical test.
    [6 marks]
    (c) Write R code to determine an estimate for µ and σ2 using Maximum Likelihood Estimators.
    (You do not have to derive these estimators). [5 marks]
  2. The data in the file Question 3 data.csv is a matrix of transition probabilities of a Markov Chain. Load the data into R using the command
    P <- as . matrix ( read . csv (path_to_f i l e ))
    with an appropriate value for path_to_file.
    (a) Verify that this Markov Chain is ergodic. (No R code necessary) [4 marks]
    (b) Suppose that an initial state vector is given by
    x=(0.1,0.2,0.4,0.1,0.2) (1)
    Write R code to determine the state vector after 10 time steps. Do this without diagonalising the matrix
    P. [3 marks]
    (c) Write R code to verify this answer by diagonalising the matrix P. Note that the eigen(A) function produces the right-eigenvectors of a matrix A (solutions of Av = λv) However we want the left-eigenvectors (solutions of vA= λv).
    These are related by
    v is a left-eigenvector of A if and only if vT is a right-eigenvector of AT.
    [8 marks]
    (d) Hence, or otherwise, determine the limiting distribution with the initial state vector given in (1).
    [4 marks]
  3. The data if the file Question 4 data.csv is a generator matrix for a Markov Process. Load the data into R using the command
    A <- as . matrix ( read . csv (path_to_f i l e ))
    with an appropriate value for path_to_file.
    (a) Suppose that X0 =0. Write R code to simulate one realisation of the Markov Process Xt. The output should be two vectors (or one data frame with two variables).
    • The first vector indicates transition times.
    • The second vector indicates which state the Markov Process takes at this time (i.e. one of 0,1,2,3,4).
    How to proceed:
    • The first line of your code must read
    set . seed (4311)
    to ensure that this realisation is repeatable.
    • For each Xt you must determine
    – what the transition time s to the next state is,
    – what the probabilities to transfer to each state are, and hence randomly select a suitable value for Xt+s.
    [9 marks] (b) Write R code to plot an appropriate graph that describes this realisation. [1 mark]

In your submitted report, you should address the research questions (shaded yellow below) by
reporting the analyses you are required to carry out (in italics below). To present your analyses and
conclusions you should write a detailed results section and a concise discussion section, using the
same format that would be expected in a journal article (i.e., APA style). There is a 1500-word
limit for this assignment. Independent of the word limit, you may include a maximum of five
tables and/or figures. References are not required but can be included to justify specific analytic
decisions (these will not be included in the word count).
Data  set
These data come from a study of healthy adults that included both questionnaires and cognitive
tasks. The accompanying text file is structured as follows:
Column 1 = participant ID number
Column 2 = delusional ideation (questionnaire range: 1-30; higher scores reflect greater lifetime
delusional ideation)
Column 3 = hallucination history (questionnaire range: 1-30; higher scores reflect greater lifetime
history of hallucinatory experiences)
Column 4 = pathology severity (questionnaire range: 10-100; higher scores reflect greater
Column 5 = metacognition 1: perception (%; lower scores reflect poorer ability to think about one’s
perceptual states)
Column 6 = metacognition 2: memory (%; lower scores reflect poorer ability to think about one’s
Column 7 = source monitoring 1: speak vs. hear (%; higher values reflect poorer source
Column 8 = source monitoring 2: imagine vs. hear (%; higher values reflect poorer source
Input the data into SPSS to perform the subsequent analyses.
Research  questions
A team of researchers asked 180 healthy adults to complete the aforementioned set of questionnaires and cognitive tasks. The researchers were primarily interested in the cognitive variables that relate to the tendency to experience delusions and hallucinations. In addition to these two outcome measures, the other variables included a self-report scale of general psychopathology and measures of metacognition and source monitoring. In the metacognition tasks, participants had to complete a standard visual episodic memory or perception task and estimate their own performance.

The researchers sought to relate participants’ performance and their estimates of performance and thus created an outcome measure reflecting the percentage (%) correspondence between the two (higher % reflects greater correspondence or metacognition). The final two tasks measured source monitoring. In these tasks, participants had to perform one of two activities when presented with a word on a computer monitor (task 1: speak the word or listen to someone else speaking it; task 2: imagine the word being spoken or listen to someone else speaking it).

Afterwards, they were presented with a list of words and had to judge whether the word had been
spoken or heard (task 1) or imagined or heard (task 2). The researchers computed the percentage of
errors in these two tasks. All the individual data have been screened and cleaned so that there are
no missing data or miscodings; all data are normally distributed with no univariate or multivariate

The researchers’ first question was whether they could predict delusional ideation and hallucination
history from the two measures of metacognition, two measures of source monitoring, and the single
measure of pathology severity. Carry out an analysis, or series of analyses, which will allow the
researchers to determine the answer to their first question. Briefly address whether the sample size
is suitable for this analysis (these analyses) and whether the data meet other assumptions of this
analysis (these analyses).

The researchers’ second question was motivated by the primacy of certain variables. In particular,
the authors thought that metacognition pertaining to perceptual states was more fundamental to
experiencing hallucinations than metacognition pertaining to memory. They similarly thought that
source monitoring pertaining to imagined vs. heard stimuli was more fundamental to experiencing
hallucinations than source monitoring pertaining to spoken vs. heard stimuli. Carry out an analysis,
or series of analyses, that would allow the researchers to incorporate their beliefs about the tasks
and allow them to understand the variables that predict hallucination experience.

The researchers’ third question concerned how source monitoring and metacognition relate to one
another in the prediction of hallucination experience. In particular, the researchers theorized that
metacognition for perception may underlie the relationship between source monitoring (imagined
vs. real) and hallucination history and thus that once you control for metacognition, the latter
relationship would reduce or disappear. Carry out an analysis, or series of analyses, which will
allow the researchers to determine the answer to this question.

If you need help with this assignment, then do not hesitate to contact us. Our writing experts can provide you with sample solutions for this assignment so that you can compare them with what you are working on.


Please determine the best analytical method for each of the 8 questions below and conduct the appropriate analysis. Write up the analysis for each and submit on Canvas

Inferential statistics questions

Qn1. A school psychologist would like to test the effectiveness of a behavior-modification technique in controlling classroom outbursts. Every time a child has an outburst, then ten minutes of free time is taken away. Four children were followed for six months and numbers of outbursts were recorded before treatment and then six months after treatment. The psychologist wants to see if there is a decline in outbursts over time. Test the null hypothesis that there is no difference in outbursts. Use a .05 alpha level.

  1. An education statistics professor wants to see if her class has a similar average GRE quantitative score as the national average of 500. The class members have the following scores. Use an alpha level of .05.
    Class GRE Quant Scores

H0: µ = 500
Ha: µ ≠ 500

  1. A soccer coach conducts a keeper clinic over the summer. She uses two different techniques to train – one for morning session children (n=13) and one for afternoon session children (n=13). She records the number of saves made by keepers at an end-of-summer drill. She wants to see if there was a difference in number of saves by keepers in the morning sessions and afternoon sessions, thereby indicating that one method would be better than the other. Use a .05 alpha level.

Qn4. A professor gives a standardized achievement test to students after going through a course in sociology. She wants to see if her students scored similarly to the national average of sociology students on the test. The population of first year sociology students has an average score of 170 on the test. Use an alpha level of .05 and determine if there is a difference between her students’ scores and the population mean.

Qn5. An English teacher wants to see if composition scores for three classes in her school are similar or different. She suspects that there are teacher differences in how composition is taught. At the end of the semester she collects scores from a standard composition test from students in each class. She has a teacher from another school score the tests, and then she takes a random sample of the scores. The scores for each class are listed below. Test the null hypothesis that there is no difference in scores. Use an alpha level of .05.

Qn6. A study on the reaction time of children with cerebral palsy reports a mean of 1.6 seconds on a particular task. A research believes that the reaction time can be reduced by using a motivating set of directions. Twelve children were given the motivating set of directions and their reaction times are recorded. A separate sample of twelve children was given no motivating directions, and completed the same task. Test if there is a difference between tes sample with motivating directions and the one without motivating directions. Use an alpha of .05.

Qn7. A method to improve math achievement was tested by an elementary school teacher. Students were given a math pretest then given the particular math tutoring. After tutoring, a post test was given. Test if there is a difference between pre and post math scores. Use alpha of .05.

Qn8. An educational psychologist designs a research study to investigate different problem-solving strategies. Subjects are randomly assigned to one of five different groups. Each group is taught to use a different problem-solving strategy. After the training, each subject is given a series of problems to solve using the various strategies. The data below are times each subject spent solving the problems. Test the hypothesis that there is no difference among groups in terms of time spend solving a problem. Use and alpha of .05.

Statistics homework help

The file containing the data for each question is attached here for your reference, and if you'd like help with this assignment, then do not cease to contact us. Note that we also have solutions for this assignment ready,statistics homework 3.docx which you can purchase to compare with your analysis.

order statistics homework

Hypothesis testing questions.
Question 1
You are studying the effects of deer browse on understory plants. You need to develop a way to quickly estimate deer density in an area. Below you have counts of deer feces from ground surveys and counts of adult deer obtained by helicopter. How could you determine if deer feces are a good predictor of deer density?

question 3.png