Question

I need clarification on R studio code. Given the below table, what is Y ~ A + B + A*B? Is it the same as Y~A*B?

Syntax Model Comments Y~ A Straight-line with an implicit y- intercept Straight-line with no y-intercept that is, a fit forced through (0.0 Polynomial model; note that the identity function I() allows terms in the model to include normal mathematical symbols A first-order model in A and B without interaction terms A model containing only first-order nteractions between A and B Y A B Y A:B Y-po-B1A+ β2B+ β3AB | A full first-order model with a term; an equivalent code is Y-A +B+ A:B Y ~ (A+ B + C)/2 | Y-pot ß1A + β2B+ β3C+ | A model including all first-order effects and interactions up to the n order, where n is given by ( ) An equivalent code in this case is

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Yes it is same i have it prove by example here i have taken data of mtcars and proved it .

## we have to clarification of Y-A+B+(AB) Is same or not Y=(AB) ### Here i have taken one data set is related to cars and i

> regi-1m(y A+B+ (A*B)) > regi Call: 1m(formulay-A+ B CA B)) Coefficients: (Intercept) A B 0.00029 39. 67426 -0.07337 -0.09789 summary(regi) Call: 1m(formulay-A+ B CA B)) Residuals: -3. 5153 -1. 6315 -0. 6346 0.9038 5.7030 Coefficients: (Intercept) 3.967e+01 2.914e+00 13.614 7.18e-14 * Min 1Q Median 3Q Max Estimate std. Error t value Pr(ltI) -7.337e-02 1.439e-02 -5.100 2.11e-05 -9.789e-02 2.474e-02 -3.956 0.000473 A B 2.900e-04 8.694 e-05 3.336 0.002407 ** signif. codes : 0 , 0.001 **, 0.01 *, 0.05 , 0.1 , 1 Residual standard error 2.692 on 28 degrees of freedom Multiple R-squared: 0. 8198, Adjusted R-squared: 0. 8005 F-statistic: 42.48 on 3 and 28 DF, p-value: 1.499e-10

Add a comment
Know the answer?
Add Answer to:
I need clarification on R studio code. Given the below table, what is Y ~ A...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • I need help writing the step by step directions (algorithm) for the following C++ code. ex....

    I need help writing the step by step directions (algorithm) for the following C++ code. ex. what would be input, output, and inbetween. No computer code! Many properties in engineering and science can be analyzed by trying to fit a straight line which uses x as the independent variable and y as the dependent variable. Suppose you have an array of x values and a corresponding array of y values. Write the process to fit a straight line to the...

  • Please I need the R program code: in part b How to find the table in...

    Please I need the R program code: in part b How to find the table in R program? pulaiuit nvesligaieu wItH Fespect to the estimate of 1 In the assumed model. B. A test is to be run on a given process for the purpose of determining the effect of an independent variable X (such as process emperature) on a certain characteristic property of the finished product Y (such as density). Four observations are to be taken at each of...

  • For expert using R , I solve it but i need to figure out what I...

    For expert using R , I solve it but i need to figure out what I got is correct or wrong. Thank you # Simple Linear Regression and Polynomial Regression # HW 2 # # Read data from csv file data <- read.csv("C:\data\SweetPotatoFirmness.csv",header=TRUE, sep=",") head(data) str(data) # scatterplot of independent and dependent variables plot(data$pectin,data$firmness,xlab="Pectin, %",ylab="Firmness") par(mfrow = c(2, 2)) # Split the plotting panel into a 2 x 2 grid model <- lm(firmness ~ pectin , data=data) summary(model) anova(model) plot(model)...

  • Solve d,e and f please using R code Part I: qqplots This part deals with qqplots...

    Solve d,e and f please using R code Part I: qqplots This part deals with qqplots of all kinds. Let's do some easy expe riments, first. Let's take a sample from a normal distribution with mu-2, sigma 3, and then look at the hist and the qqplot of that data: set.seed(3) n 100 # Sample size x norm(n,2,3) # Sample from N(mu-2, sigma-3) hist(x) # Looks normal. But that depends on breaks. qqnorm(x) # This doesn't depend on binsize, and...

  • need help solving and checking answers Evaluate each function for the given value of x, and...

    need help solving and checking answers Evaluate each function for the given value of x, and write the input and output as an ordered pair. Need help? Check out these resources: http://virtualnerd.com/algebra 1/linear-equation-analysis/point- slope-standard-form/standard-form-examples/write-linear- equation standard-form-slope-point 27. f(x) = 3x - 7 for x = 6 28.g(x) = 9x - 5 for x = 3 29.h(x) = 12x for x = 4 30.t(x) = 8x - 5 for x = 7 Linear Functions and Slope Intercept Form You can use...

  • Below is what I am working. The first two screen caps are from Codio a program we use online at my school. I have been r...

    Below is what I am working. The first two screen caps are from Codio a program we use online at my school. I have been running my code through Python 3 to make sure it works before submitting my assignments; usually I have little to no issues. But now I am stuck on this one problem. Please help. Step 4: Construct confidence interval for population proportion Construct a 99% confidence interval for the proportion of months with rice production above...

  • I need someone to help answer table 1 only mass, volume, y density and table 2...

    I need someone to help answer table 1 only mass, volume, y density and table 2 with a graph each table. please read the procesures, thank you Experiment 2 Graphing and Measurements Graphs summarize numerical data efficiently and are usually casier to understand and interpret than columns of numbers. In this experiment, you will collect data and construct a graph that makes an effective visual presentation. Materials: Equipment metric ruler Chemical a kit with 5 pieces Procedure: Part I: Measurements...

  • A group of physics students collected data from a test of the projectile motion problem that...

    A group of physics students collected data from a test of the projectile motion problem that was analyzed in a previous lab exercise (L5). In their test, the students varied the angle and initial velocity Vo at which the projectile was launched, and then measured the resulting time of flight (tright). Note that tright was the dependent variable, while and Vo were independent variables. The results are listed below. (degrees) Time of Flight (s) Initial Velocity V. (m/s) 15 20...

  • Problems 473 results from parts (a), (b), and (c). What model seems most plausible? How do the da...

    can you answer question 9 please Problems 473 results from parts (a), (b), and (c). What model seems most plausible? How do the data limit your conclusions? tle the data from Freund (1979), presented in Problem 22 in Chapter 14. Taking be model discussed there as the maximum model, repeat parts (a) through (h) of Problem 6. In part (h), note the possible role of collinearity. A random sample of data was collected on residential sales in a large city....

  • I need Summary of this Paper i dont need long summary i need What methodology they used , what is the purpose of this p...

    I need Summary of this Paper i dont need long summary i need What methodology they used , what is the purpose of this paper and some conclusions and contributes of this paper. I need this for my Finishing Project so i need this ASAP please ( IN 1-2-3 HOURS PLEASE !!!) Budgetary Policy and Economic Growth Errol D'Souza The share of capital expenditures in government expenditures has been slipping and the tax reforms have not yet improved the income...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT