讲解:PS923、Analysis、R、RPython|SPSS

Assessment 1PS923 - Methods and Analysis in Behavioural Science• This assessment counts for 33% of your overall grade.• Submission Instructions: Submit your solution as one html or pdf document containing both Rcode, R output, figures, and written out text (i.e., full sentences) to Tabula as “Assessment 1” untilWed, 27. November, 12:00 pm (noon).• Please use RMarkdown to create the document.• Important: Your document should be called YOUR-STUDENT-ID_a21 (followed by the correct fileextension). Please also add your student ID to the top of the document. To ensure anonymous marking,please refrain from using your name in either the document script or the file name.• Your text does not need to contain references (i.e., references to scienitifc papers).General GuidelinesPlease complete the following questions. Your answer to each question should have two separate sections foreach question, one immediately after the other.In the first section, write out your answers using complete sentences, as you might for the results section of apaper. Include descriptive statistics in the text, or in tables or figures as appropriate. Tables and figuresshould be of publication quality (i.e., fully labelled, etc.). Integrate inferential statistics into your descriptionof the results. Your answers might be short. Given the correctness/appropriatness of the statisticalanalysis, the first section will play the main role for your mark.The second section should include the complete R code that you used and its output. Add comments (after a#) to explain what the code does. The code should show all of the commands that you used, enough for me toreplicate exactly what you did (I will be copying and pasting code to run it, so make sure that works). Youcan include figures here that you used to explore the data that you do not wish to include in the first section.I will use the second section to help identify the source of any mistakes. For practical reports and papers youwould only submit the first section, and thus the first section should stand alone without the second section.1Example QuestionDoes mere exposure to a stimulus improve its attractiveness? In an initial stage, participants were exposedto a series of pseudowords. Words were exposed at very short durations with a mask. (Pilot work establishedthat participants were unable to report whether or not a word was presented before the mask in theseconditions.) In a second phase, a mixture of the old, exposed pseudowords and new, previously unseenpseudowords were presented. Participants could view each word for as long as they liked before rating theirliking for the word on a 1-10 scale. Using the data set mere_exposure.csv, test the hypothesis that mereexposure increases the attractiveness of pseudowords.Example AnswerSection 1Does exposure to a word improve attractiveness? To investigate this question, 32 participants took partin an experiment in which their main task was to rate the attractiveness of pseudowords on a 1-10 scale.Before the main task, participant were shown half of the pseudowords for a very short duration so that theycould not perceive them consciously. Figure 1 shows the distribution and means of the attractiveness ratingsand suggests that preexposed pseudowords (i.e., those shown briefly before the main task) were rated asmore attractive than new, previously unseen pseudowords. We analysed the attractiveness ratings using anANOVA with single repeated-measures factor exposure (old versus new). The difference in ratings (difference= 1.82, SE = 0.12) was significant, F(1, 31) = 228.33, p ExposureAttractivenessFigure 1. Attractiveness ratings of pseudowords as a function of prior exposure. Points in the backgroundshow the raw data (overlapping points are offset on the x-axis), black points in the foreground show themean, error bars show 95% within-subjects confidence intervals.Section 2library(tidyverse)library(afex)library(emmeans)mere_exposure glimpse(mere_exposure)#> Observations: 32#> Variables: 32#> $ id 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ...#> $ old_liking 7.4, 6.5, 6.8, 7.8, 6.9, 9.2, 6.2, 7.9, 6.5, 9.1, 7...#> $ new_liking 5.6, 5.4, 3.4, 5.2, 6.1, 8.0, 4.4, 6.1, 3.1, 6.4, 6...me_tidy %pivot_longer(cols = -id, names_to = Exposure, values_to = Attractiveness)str(me_tidy)#> Classes tbl_df, tbl and data.frame: 64 obs. of 3 variables:#> $ id : num 1 1 2 2 3 3 4 4 5 5 ...#> $ Exposure : chr old_liking new_liking old_liking new_liking ...#> $ Attractiveness: num 7.4 5.6 6.5 5.4 6.8 3.4 7.8 5.2 6.9 6.1 ...me_tidy %>%group_by(Exposure) %>%summarise(mean = mean(Attractiveness),sd = sd(Attractiveness))#> # A tibble: 2 x 3#> Exposure mean sd#> #> 1 new_liking 5.74 1.34#> 2 old_liking 7.56 1.01ggplot(me_tidy, aes(Attractiveness)) +geom_histogram() +facet_wrap(~Exposure)new_l代做PS923、代写Analysis、代写R语言、R编程设计iking old_likingAttractivenesscount(a1 #> Anova Table (Type 3 tests)#>#> Response: Attractiveness#> Effect df MSE F ges p.value#> 1 Exposure 1, 31 0.23 228.33 *** .38 #> ---#> Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 + 0.1 1pairs(emmeans(a1, Exposure))#> contrast estimate SE df t.ratio p.value3#> old_liking - new_liking 1.82 0.12 31 15.110 afex_plot(a1, Exposure, error = within,factor_levels = list(Exposure = c(Old, New)),data_arg = list(cex = 3.5, color = darkgrey))4Task 1One important research question in many applied fields, such as marketing, is which factors predict thesubjective valuation of objects. For example, which value do we associate with a specific box of chocolates?Intuitively it makes sense to assume that the judgment made by a person of how much someone else wouldvalue an object should be a good predictor for how much the person themselves values an object. The goal ofthis task is to investigate this relationship: How good of a predictor is a value judgment participants do forother people in predicting their own value judgment for the same object?self_other_judgments.csv contains parts of the data from a large study in which participants were askedto judge the value of a box of chocolates for themselves (variable self) as well as for others (variable other).Participants were randomly assigned to one of two groups (variable task). In the WTP group, participantshad to judge how much they would be willing to pay for the box of chocoloates and how much they believedsomeone else would be willing to pay for the box of chocoloate (in US$). In the Enjoy group, participantshad to judge how much they would enjoy the box of chocoloates and how much they believe someone elsewould enjoy the box of chocoloates on a scale from 0 to 100. The data also contains a participant identifier(variable pid) as well as the information which judgment had to be performed first (Order).Your task is to analyse the data using a linear regression model. The main research questions are (a) ifother-judgments predict self-judgments and (b) whether they do so equally for both groups (i.e., level of taskfactor). Present the results as you would do in a paper in APA format. That means, describe your statisticalmodel and results and describe which conclusions the results allow with regards to the research questions.Also, include only one figure (which may contain multiple panels) with appropriate figure caption in the firstsection for this task.Task 2An important determinant for individuals’ preferences for certain products is a products’ value or rank on arelevant dimension compared to similar products. For example, when choosing between different laptops, youmight be comparing them in terms of their disk space; one laptop may have 0.5 TB disk space and anothermay have 1 TB. One research question in this literature is whether the absolute rank (e.g., the absoluteamount of disk space) or the relative rank (e.g., how much disk space compared to other laptops) of theproduct is a better predictor of individuals’ preferences. The former ignores the distribution of the relevantdimension whereas the latter ignores the absolute value on the relevant dimension.For example, imagine a set of 10 laptops 8 of which have a disk space below 0.5 TB, one laptop has a diskspace of 0.5 TB, and one laptop has a disk space of 1 TB. In this case, the laptops with 0.5 TB disk spaceand 1 TB disk space both have a high relative rank (relative ranks of 2 and 1, respectively). However, thelaptop with 0.5 TB has a medium absolute rank whereas the laptop with 1 TB has a high absolute rank.By making the distribution of attribute values in a set less extreme, relative and absolute rank can be morealigned with each other. By making the distribution of attribute values in a set even more extreme, relativeand absolute rank can be even more strongly pitted against each other.wtp_factorial.csv contains data from a (simulated) factorial experiment which investigated this researchquestion. Participants were presented with objects which either had a low, medium, or high rank and wemanipulated the type of rank, either relative or absolute. In addition, we sampled participants fromtwo different populations, either general population (excluding economists) and economists. Participantspreferences were obtained via willingness-to-pay (wtp) elicitations (i.e., wtp was the dependent variable).Your task is to analyse the data using an ANOVA (preferably using afex) and present the results as youwould do in a paper in APA format. That means, describe your statistical model and results and describewhich conclusions the results allow with regards to the research question. Be careful to not draw unwarrantedcausal conclusions. Also, include only one figure (which may contain multiple panels) with appropriate figurecaption in the first section for this task.5转自:http://www.6daixie.com/contents/18/4448.html

你可能感兴趣的:(讲解:PS923、Analysis、R、RPython|SPSS)