33051/predict-weight-when-height-is-given-using-linear-regression

You can the concept of linear regression for this purpose. Its a statistic tool used to build relationship between to variables called predictor variable which is heights of people in your case and response variable which is weight in this case. Follow these steps:

You can try something like this:

# The predictor vector. a <- c(111, 123, 134, 156, 145, 176, 198, 133, 131, 181) # The resposne vector. b <- c(56, 61, 65, 71, 45, 54, 74, 76, 68, 58) # Apply the lm() function. relation <- lm(a~b) # Find weight of a person with height 170. z <- data.frame(x = 170) result <- predict(relation,z) print(result)

I'm trying to create a dashboard using ...READ MORE

One of the way by which you ...READ MORE

These are sequential steps which need to ...READ MORE

Answer to your follow up question: We can ...READ MORE

The documentation for the lp package provides ...READ MORE

Use expand.grid to get all possible combinations ...READ MORE

Well it truly depends on your requirement, If ...READ MORE

You can do this in R using ...READ MORE

R Programming gives a broad variety of ...READ MORE

Hey @ali, rnorm() function requires an argument, ...READ MORE

OR

At least 1 upper-case and 1 lower-case letter

Minimum 8 characters and Maximum 50 characters

Already have an account? Sign in.