当前位置:天才代写 > 作业代写 > Factorial Designs代写 R code代写 ANOVA代写 college course代写

Factorial Designs代写 R code代写 ANOVA代写 college course代写

2021-01-18 16:46 星期一 所属: 作业代写 浏览:115

Factorial Designs代写

Factorial Designs, Within-subjects Designs

Factorial Designs代写 A corpus syntactician/sociolinguist is interested in how usage of adverbs is changing in American English. Although the prescriptive

Due:  11:59 pm, March 27, 2019

I.  A 3 factor entirely between subjects design Factorial Designs代写

A corpus syntactician/sociolinguist is interested in how usage of adverbs is changing in American English.  Although the prescriptive standard tells us that we should say “He runs slowly,” very few of us actually say this anymore.  Most of us will say “He runs slow” with no adverb.  It’s a general pattern that we’re losing our adverb/adjective distinction.  The researcher wonders whether being in a subordinate clause vs. the main clause affects how likely people are to use an adverb.  (Note that effect of clause type is thus the main research question!)  Furthermore, the researcher suspects that dialect is influencing how quickly the adverb/adjective distinction is lost, so she intends to include region of the country as a factor.  In addition, formality of writing style is likely to make a large difference in whether adverbs are maintained in written language.

Factorial Designs代写
Factorial Designs代写

The researcher collects written text samples from a variety of writers,

all native speakers of American English.  She collects informal writing samples from facebook posts and informally written blogs.  She collects formal writing samples from college course term papers (involving a fairly complex human subjects process, I’m afraid). She collects both formal and informal samples from college students in Minnesota, Tucson, and Los Angeles. Unfortunately, for logistical reasons she is unable to collect term paper samples from the same people she collects facebook and blog posts for, so the writing style is between-subjects (different subjects in each condition).  Factorial Designs代写

She then finds all the locations in the texts where prescriptive grammar would prescribe use of an adverb, and notes whether an adverb or an adjective was used in each case.  For the subordinate clause vs. main clause variable (“clause type”), she realizes that unfortunately, many of her subjects (writers) don’t happen to use the environment for an adverb in both subordinate and main clauses.  However, she does have 7 writers who used adverb-expected-environments in subordinate clauses, and 7 more who used them in main clauses, for each location and each writing style (formal and informal).  Thus, the clause type factor is also between-subjects (separate subjects for each condition).  (This is not totally realistic, but let’s assume it.)  Obviously, region of the country is also a between-subjects variable.

For each text,Factorial Designs代写

the researcher calculates the percentage of all adverb environments in which the writer actually used an adverb rather than an adjective. Thus, the dependent variable is percent adverb usage where an adverb would be prescriptively expected, within each text (and each subject supplies one text).  The data is in a .csv document on the d2l site.  It has one column to code for each factor and a fourth column for the %adv_use data itself and a fifth for the subject code.  Load the data into R.  This should be the appropriate format for a data sheet for a 3-factor between-subjects design.  Make sure to tell R to treat the subject factor “as.factor”.  Make a bar graph, using one of the ways we’ve used to get a 3-factor bar graph before.  Get an idea of what you think is happening in the data, but don’t write that up yet.

Perform a 3-factor ANOVA, with the factors “location,” “style,” and “clause type” (all between-subjects factors) on this data.  Write a report of the results as you would in a publication, describing the overall pattern of results and reporting the statistical results.  Do appropriate follow-up tests, depending on which interactions are significant.  (Note:  Make sure you remember about which factor to collapse and which to split!)  Factorial Designs代写

(Remember that to collapse a between-subjects factor,

you simply don’t tell the model it exists, and the number of subjects within a condition gets doubled or tripled, etc., depending how many levels you’re collapsing over.)  Write a report of these results, as well, as you would in a publication.  Make sure you also explain the direction of effects (and perhaps pattern of interaction(s)) in your writeup, in appropriate ways relative to what is significant, whether main effects are reliable, etc.  (Warning: this part is going to be hard.)  Also write a separate sentence or two saying why you did the follow-up tests you did.Factorial Designs代写

Now test for you whether you have a violation of the assumption of homogeneity of variance by running Levene’s Test.  On this test, a significant result means you have a significant violation of homogeneity of variance.  That is, non-significant on Levene’s Test is good.  (It’s testing whether the variance differs significantly across groups.)  Levene’s Test can be done either based on the mean (older method) or the median (newer method).  Do both.  The R code for this requires you to install some extra things.

The R code is:

install.packages(“car”,dependencies=TRUE)

library(“car”, lib.loc=”~/Library/R/3.3/library”)

leveneTest(my_depvar ~ A*B*C, data = my_dataframe, center = mean)

leveneTest(my_depvar ~ A*B*C, data = my_dataframe, center = median)Factorial Designs代写

One time I had to install the latest version of R on my computer to get the first line of this to work.  (The parts in italics here are placeholders for whatever you called your dataframe, your dependent variable, and factors A, B, and C.)

Does this data violate homogeneity of variance?  How can you tell?  How might this impact, or not impact, your interpretation of the results?

II.  A 1-factor within-subjects design Factorial Designs代写

A phonetician is trying to document what the acoustic differences are among Navajo words ending in a vowel, a vowel followed by glottal stop (written as an apostrophe), and a vowel followed by /h/ (for example yishłaa “I accomplished it,” wóshłe’ “I would like to accomplish it,” and yishłééh “I am accomplishing it”).  It is unusual for a language to distinguish all three of these options for ends of words, but Navajo has this interesting distinction.  (This is obviously not a minimal pair.  Navajo doesn’t do minimal pairs much, because the words are so complex.

Just pay attention to the sounds at the end of the words.)  The phonetician records 7 native Navajo speakers reading 10 words ending in vowel, 10 ending in glottal stop (‘), and 10 ending in /h/.  The phonetician measures several acoustic features of these words, but we’ll work with just one, the fall time of amplitude of the last vowel of the word.  This means how long it takes the vowel to go from nearly full amplitude to nearly zero amplitude, in milliseconds.  We expect fall time to be short for final glottal stop (‘), because a glottal stop cuts the vowel off suddenly.  We are perhaps not sure what to predict about the other two categories.  The phonetician averages across the 10 items in each condition, leaving one measurement for each speaker for each condition.Factorial Designs代写

The data is as follows:

speaker final vowel final glottal stop (‘) final /h/
1 100 82 142
2 60 33 72
3 124 Factorial Designs代写 112 141
4 42 42 60
5 210 90 268
6 114 65 134
7 150 105 145

Perform a single-factor within-subjects ANOVA on the data, with final segment as the factor.  To do this, enter the data in R, using one variable for speaker number, one for fall time, and one for final segment (vowel, glottal, h).  I’ve posted the data file as a .csv file, but I didn’t convert it to the right format for you.  Here are the commands I used to convert it to the right format:

# reformat the data to a single long column for the dependent variable

# stack the dependent variable, but leave out the speaker column

my_dataframe2 = stack(my_dataframe, select = –my_speaker_variable)

# add a speaker column in with the right speaker numbers and make it a factor

my_dataframe2$speaker = c(1:7, 1:7, 1:7)Factorial Designs代写

my_dataframe2$speaker = as.factor(my_dataframe2$speaker)

# give it better column names

colnames(my_dataframe2) = c(“falltime”, “finalseg”, “speaker”)

#check and make sure this came out right

View(my_dataframe2)

summary(my_dataframe2)

To make things easier, I have also uploaded the version from after this reformatting.

Now perform the overall ANOVA as in the lab activity.  Is there a significant effect of final segment?  Write a report of this result as you would in a publication.  Factorial Designs代写

Now test for whether there’s a violation of the assumption of sphericity.  If there is, apply the Greenhouse-Geisser correction to compensate for it.  Here’s how to do the this:

Write a report of the result as you would if you are using Mauchly’s test,

and the Greenhouse-Geisser correction if there is a violation of sphericity.  Is there a significant effect when corrected as appropriate for a violation of sphericity?Factorial Designs代写

You would probably want to follow up with planned comparisons, to determine which final segments differ from which.  We won’t do all the necessary ones, but do the planned comparison of vowel-final to final /h/.  We didn’t have a real prediction about that, but they might well differ (because /h/ increases breathiness of the preceding vowel, which probably lowers its amplitude).  It might be important to find out if there was any significant difference between these two conditions.  To do this planned comparison, create a dataframe that is a subset of the original dataframe, including only the two conditions you want to compare (just as you did for between-subjects planned comparisons).  Do a within-subjects ANOVA using repeated measures just as above.  Is there a significant difference between fall time for vowel-final vs. /h/-final words?  Write a report of this as you would in a publicationFactorial Designs代写

Speakers differ in how fast they talk overall, and this is likely to affect fall time of the vowel.

(Someone talking slowly probably has their vowels taper off more slowly overall, regardless of final segment.)  Explain why using a within-subjects design makes this not a problem.  Try running a regular between-subjects ANOVA on this same data (all three final segment conditions, the overall ANOVA), pretending that the various conditions’ data were obtained from different groups of speakers.  To get this, you’re going to have to add a new column of speaker numbers where you number the speakers 1-21 instead of 1-7 three times, so that R knows that (we’re pretending that) each subject is a different person.  To do this:

#Add a new column of between-subject subject numbers

my_dataframe$speakerBetween = c(1:21)

#Don’t forget to make the new speaker number a factor instead of integers

my_dataframe$speakerBetween = as.factor(my_dataframe$speakerBetween)

#Check it Factorial Designs代写

summary(my_dataframe)

How do the results differ from the results of the within-subjects design?  Why?  

III.  Recognizing what type of effect is being described

Very loosely based on:  Zesiger, P. et al.  2010.  The acquisition of pronouns by French children:  A parallel study of production and comprehension.  Applied Psycholinguistics 31: 571-603.

For ease of understanding, I’m going to convert this study to English instead of French.  The real study is very interesting, though.

Zesiger et al. are interested in how children learn to understand the gender and syntactic structure of pronouns.Factorial Designs代写

They use pictures and little stories showing a father putting a blanket on a child, and then a researcher says something like “What is Papa doing to Pierre? (male name)” and a puppet answers “He’s covering her.” or “She’s covering him.”  Notice that in both cases, the gender of a pronoun is wrong (the object pronoun in the first case, the subject pronoun in the second case).

The correct answer for some items is feminine instead (e.g. “What is Mama doing to Sophie?”  “She’s covering him.”/”He’s covering her.”).  The subjects, children of age 4, age 5, or age 6, are told that the puppet is just learning to talk and sometimes says things wrong, and that they should help the puppet learn to talk by telling it how to say things right when it says something wrong.  Each child hears several items (stories/incorrect sentences) for a condition.  The dependent variable is what percentage of the puppet’s incorrect sentences the child corrects.  Sometimes the kids don’t notice the puppet’s error, and don’t correct it, but often, they do.

The average results (percent of items corrected) are as follows.

Assume that a difference of 5 or 10% is meaningful (=likely to be significant when tested), but that a difference of 1 or 2% is not.Factorial Designs代写

4-year-olds subject pronoun wrong object pronoun wrong
masculine would be correct 31 30
feminine would be correct 20 21
5-year-olds
subject pronoun wrong object pronoun wrong
masculine would be correct 69 51
feminine would be correct 50 40
6-year-olds subject pronoun wrong object pronoun wrong
masculine would be correct 92 60
feminine would be correct 60 49

What type of design is this (how many by how many)?  What are the factors and their levels?

For each of the following statements describing the effects in this (made-up) dataset, state what statistical effect it is describing.  That is, is the statement describing a main effect (of which factor?), a two-way interaction (of which factors, averaged across which factor), a two-way interaction (of which factors, at a particular level of the third, split factor separately), the three-way interaction, a simple effect (of which factor, at what levels of the other factors), or what?

  1. Children correct subject pronouns more often than object pronouns, except for 4-year-olds, who correct them equally often.Factorial Designs代写
  2. Older children correct pronouns more often than younger children.
  3. Children correct pronouns that should have been masculine more often than pronouns that should have been feminine.
  4. However (continuing from point 3), this effect (greater correction of supposed-to-be-masculine pronouns) is stronger for older children correcting subject pronouns, but remains constant across ages when children are correcting object pronouns.
  5. 5-year-olds correcting pronouns that should have been feminine correct more subject pronouns than object pronouns.  (We probably wouldn’t actually say this in describing the results, but figure out what type of effect it is anyway.)
  6. If the correct pronoun would be feminine, 4-year-olds do not differ in how often they correct subject vs. object pronouns, but older children are more likely to correct subject pronouns.  (We probably wouldn’t say this in describing the results either.)
Factorial Designs代写
Factorial Designs代写

其他代写:考试助攻 计算机代写 java代写 function代写paper代写  web代写 编程代写 report代写 数学代写 algorithm代写 金融经济统计代写 finance代写 python代写 java代写 code代写 代码代写 project代写 Exercise代写 作业帮助 analysis代写

合作平台:天才代写 幽灵代写 写手招聘 Essay代写

 

天才代写-代写联系方式