Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • equality of regression coefficients

    I am currently attempting to estimate the relationship between writing improvement (Y) and feedback students received. To do this, I have collected data of feedback and writing scores of first and final drafts of a writing assignment (i.e., pre scores and post scores) for 300 students. Every student in my study received both highlevel and lowlevel feedback on their first draft. So my regression equations are as follows:

    equation 1: Y= a+B1X1+B2X2+e (for high-level) (Y: post high-level score, X1: pre high-level score, X2: number of high-level comments)
    equation 2: Y= a+C1X3+C2X4+u (for low-level) (Y: post low-level score, X3: pre low-level score, X4: number of low-level comments)

    The reviewer said that it’s not enough to conduct analysis separately for two groups (highlevel and lowlevel) but rather equality of regression coefficients should be tested explicitly through multigroup analysis or via interaction terms. I pooled these two datasets (N=600) and tested coefficients equality via interaction term (adding a dummy variable, feedback focus, highlevel or lowlevel. I have centered the number of comments (highlevel and lowlevel, they are in the same column), but still failed to get rid of multicollinearity.
    I have read a bit on the Chow test, but I am not quite sure whether it can be used in my study. In the studies using Chow test, the samples are split into two groups by an indicator variable such as gender, male and female. Male and female are exclusive. But in my study, feedback focus, highlevel and lowlevel, feedback focus, are not exclusively divided. Every student in my study received both highlevel and lowlevel feedback on their first draft. In other words, the sample students are exactly the same for both high-level and low-level groups.
    I would really appreciate any help in doing this. Thank you very much in advance.

  • #2
    Maybe try something like that below. (Begin at the "Begin here" comment; the first part is just to generate a fictitious dataset for illustration.)

    .ÿ
    .ÿversionÿ15.1

    .ÿ
    .ÿclearÿ*

    .ÿ
    .ÿsetÿseedÿ`=strreverse("1501146")'

    .ÿquietlyÿsetÿobsÿ300

    .ÿ
    .ÿgenerateÿintÿsidÿ=ÿ_n

    .ÿgenerateÿdoubleÿsid_uÿ=ÿrnormal()

    .ÿ
    .ÿquietlyÿexpandÿ2

    .ÿbysortÿsid:ÿgenerateÿbyteÿfblÿ=ÿ_n

    .ÿlabelÿdefineÿFeedbackLevelsÿ1ÿLowÿ2ÿHigh

    .ÿlabelÿvaluesÿfblÿFeedbackLevels

    .ÿ
    .ÿgenerateÿbyteÿbefÿ=ÿruniformint(65,ÿ100)

    .ÿgenerateÿbyteÿcmtÿ=ÿruniformint(1,ÿ20)

    .ÿ
    .ÿgenerateÿdoubleÿxbÿ=ÿsid_uÿ+ÿrnormal()

    .ÿsummarizeÿxb,ÿmeanonly

    .ÿgenerateÿbyteÿaftÿ=ÿ80ÿ+ÿfloor(20ÿ*ÿ(xbÿ-ÿr(min))ÿ/ÿ(r(max)ÿ-ÿr(min)))

    .ÿ
    .ÿdropÿsid_uÿxb

    .ÿ
    .ÿ*
    .ÿ*ÿBeginÿhere
    .ÿ*
    .ÿmixedÿaftÿi.fbl##c.bef##c.cmtÿ||ÿsid:ÿ,ÿnolrtestÿnolog

    Mixed-effectsÿMLÿregressionÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿ600
    Groupÿvariable:ÿsidÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿgroupsÿÿ=ÿÿÿÿÿÿÿÿ300

    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿObsÿperÿgroup:
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿminÿ=ÿÿÿÿÿÿÿÿÿÿ2
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿavgÿ=ÿÿÿÿÿÿÿÿ2.0
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿmaxÿ=ÿÿÿÿÿÿÿÿÿÿ2

    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿWaldÿchi2(7)ÿÿÿÿÿÿ=ÿÿÿÿÿÿÿ4.45
    Logÿlikelihoodÿ=ÿ-1516.5414ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿÿÿÿÿÿÿ=ÿÿÿÿÿ0.7269

    ---------------------------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿaftÿ|ÿÿÿÿÿÿCoef.ÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    ----------------+----------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿfblÿ|
    ÿÿÿÿÿÿÿÿÿÿHighÿÿ|ÿÿÿ4.363021ÿÿÿÿ4.06972ÿÿÿÿÿ1.07ÿÿÿ0.284ÿÿÿÿ-3.613484ÿÿÿÿ12.33953
    ÿÿÿÿÿÿÿÿÿÿÿÿbefÿ|ÿÿÿÿ.004912ÿÿÿ.0339967ÿÿÿÿÿ0.14ÿÿÿ0.885ÿÿÿÿ-.0617203ÿÿÿÿ.0715443
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿfbl#c.befÿ|
    ÿÿÿÿÿÿÿÿÿÿHighÿÿ|ÿÿ-.0559575ÿÿÿ.0489091ÿÿÿÿ-1.14ÿÿÿ0.253ÿÿÿÿ-.1518176ÿÿÿÿ.0399026
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿÿÿcmtÿ|ÿÿ-.0972584ÿÿÿ.2438254ÿÿÿÿ-0.40ÿÿÿ0.690ÿÿÿÿ-.5751474ÿÿÿÿ.3806306
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿfbl#c.cmtÿ|
    ÿÿÿÿÿÿÿÿÿÿHighÿÿ|ÿÿ-.2087776ÿÿÿ.3382425ÿÿÿÿ-0.62ÿÿÿ0.537ÿÿÿÿ-.8717208ÿÿÿÿ.4541656
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿc.bef#c.cmtÿ|ÿÿÿ.0012077ÿÿÿÿ.002895ÿÿÿÿÿ0.42ÿÿÿ0.677ÿÿÿÿ-.0044664ÿÿÿÿ.0068819
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    fbl#c.bef#c.cmtÿ|
    ÿÿÿÿÿÿÿÿÿÿHighÿÿ|ÿÿÿÿ.002746ÿÿÿ.0040705ÿÿÿÿÿ0.67ÿÿÿ0.500ÿÿÿÿ-.0052321ÿÿÿÿ.0107241
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿ_consÿ|ÿÿÿ89.30441ÿÿÿÿ2.85695ÿÿÿÿ31.26ÿÿÿ0.000ÿÿÿÿÿÿ83.7049ÿÿÿÿ94.90393
    ---------------------------------------------------------------------------------

    ------------------------------------------------------------------------------
    ÿÿRandom-effectsÿParametersÿÿ|ÿÿÿEstimateÿÿÿStd.ÿErr.ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -----------------------------+------------------------------------------------
    sid:ÿIdentityÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ|
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(_cons)ÿ|ÿÿÿ5.283696ÿÿÿ.6923168ÿÿÿÿÿÿ4.087011ÿÿÿÿ6.830772
    -----------------------------+------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿvar(Residual)ÿ|ÿÿÿ5.310134ÿÿÿ.4370759ÿÿÿÿÿÿ4.519009ÿÿÿÿ6.239757
    ------------------------------------------------------------------------------

    .ÿtestÿ2.fbl#befÿ2.fbl#cmtÿ2.fbl#bef#cmt

    ÿ(ÿ1)ÿÿ[aft]2.fbl#c.befÿ=ÿ0
    ÿ(ÿ2)ÿÿ[aft]2.fbl#c.cmtÿ=ÿ0
    ÿ(ÿ3)ÿÿ[aft]2.fbl#c.bef#c.cmtÿ=ÿ0

    ÿÿÿÿÿÿÿÿÿÿÿchi2(ÿÿ3)ÿ=ÿÿÿÿ2.08
    ÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿ=ÿÿÿÿ0.5563

    .ÿ
    .ÿ//ÿOr
    .ÿestimatesÿstoreÿFull

    .ÿquietlyÿmixedÿaftÿc.bef##c.cmtÿ||ÿsid:ÿ

    .ÿlrtestÿFull

    Likelihood-ratioÿtestÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿLRÿchi2(4)ÿÿ=ÿÿÿÿÿÿ2.22
    (Assumption:ÿ.ÿnestedÿinÿFull)ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿ=ÿÿÿÿ0.6958

    .ÿ
    .ÿ//ÿOr
    .ÿquietlyÿestimatesÿrestoreÿFull

    .ÿmarginsÿfbl,ÿpost

    PredictiveÿmarginsÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿNumberÿofÿobsÿÿÿÿÿ=ÿÿÿÿÿÿÿÿ600

    Expressionÿÿÿ:ÿLinearÿprediction,ÿfixedÿportion,ÿpredict()

    ------------------------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿÿÿÿÿÿÿÿDelta-method
    ÿÿÿÿÿÿÿÿÿÿÿÿÿ|ÿÿÿÿÿMarginÿÿÿStd.ÿErr.ÿÿÿÿÿÿzÿÿÿÿP>|z|ÿÿÿÿÿ[95%ÿConf.ÿInterval]
    -------------+----------------------------------------------------------------
    ÿÿÿÿÿÿÿÿÿfblÿ|
    ÿÿÿÿÿÿÿÿLowÿÿ|ÿÿÿ89.74059ÿÿÿÿ.188371ÿÿÿ476.40ÿÿÿ0.000ÿÿÿÿÿ89.37139ÿÿÿÿ90.10979
    ÿÿÿÿÿÿÿHighÿÿ|ÿÿÿ89.66372ÿÿÿ.1884192ÿÿÿ475.87ÿÿÿ0.000ÿÿÿÿÿ89.29443ÿÿÿÿ90.03302
    ------------------------------------------------------------------------------

    .ÿtestÿ1.fblÿ=ÿ2.fbl

    ÿ(ÿ1)ÿÿ1bn.fblÿ-ÿ2.fblÿ=ÿ0

    ÿÿÿÿÿÿÿÿÿÿÿchi2(ÿÿ1)ÿ=ÿÿÿÿ0.17
    ÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿ=ÿÿÿÿ0.6844

    .ÿ
    .ÿexit

    endÿofÿdo-file


    .


    Notes:

    I included a term for the interaction of prescore and comment tally, although I'm not sure about exogeneity there (chicken-and-egg).

    You mention problems with collinearity, but don't show any code. If no one can see what you were doing, then it's hard to advise.

    With a crossover study, aspects of the study design are often included in order to balance (or detect) carryover effects, and the sequence of intervention is often randomly allocated to participant. If that's the case with yours, you might want to include something in your model for carryover / sequence. Take a look at Stata's biopharmaceutical suite of commands help pk for some pointers on how that's done.

    Comment


    • #3
      I just noticed that with the Wald test, I forgot to include the intercept coefficient's difference. The Results window should read like that below.

      .ÿtestÿ2.fblÿ2.fbl#befÿ2.fbl#cmtÿ2.fbl#bef#cmt

      ÿ(ÿ1)ÿÿ[aft]2.fblÿ=ÿ0
      ÿ(ÿ2)ÿÿ[aft]2.fbl#c.befÿ=ÿ0
      ÿ(ÿ3)ÿÿ[aft]2.fbl#c.cmtÿ=ÿ0
      ÿ(ÿ4)ÿÿ[aft]2.fbl#c.bef#c.cmtÿ=ÿ0

      ÿÿÿÿÿÿÿÿÿÿÿchi2(ÿÿ4)ÿ=ÿÿÿÿ2.25
      ÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿ=ÿÿÿÿ0.6907

      Comment

      Working...
      X