running a regression with two datasets

hi, for my bachelor thesis I want to run a regression by seeing if a terrorist attack has any effect on economic growth. I have two datasets, 1 is with quarterly data of unemployment rate, investment rate, GDP growth, economic sentiment and consumer confidence of 27 countries. Another dataset are all the terrorist attacks, succesfull and unsuccesful in these 27 countries, and the weapon used, target, and attack type.
For my dependent variable i want to use GDP growth, for my independent variables i want to use unemployment rate, investment rate, consumer confidence and eocnomic sentiment. as my dummy variable i want to use the succesfull atack with three years before that period and three years after the period. i also want to use the type of the attack, target, and weapon used as my dummy variables.

In R, i tried to organize these two datasets into one, which gives me an error. can someone help me with this and with my regression?

Error in data.frame(alledatagoed, GTD_europe) :
arguments imply differing number of rows: 2700, 5301

Hi!

To help us help you, could you please prepare a reproducible example (reprex) illustrating your issue? Please have a look at this guide, to see how to create one:

Also, please narrow down the scope of your question and try changing your topic's title accordingly. We like to keep things tidy around here so we like to have one well defined question per topic, but you can make as many questions as you need.

do you mean like this?
Country TIME GDP growth `economic sentime…

1 United King… 1995-Q1 0.389289 105
2 United King… 1995-Q2 0.3767649430000… 100.90000000000001
3 United King… 1995-Q3 0.9547757009999… 99.400000000000006
4 United King… 1995-Q4 0.1862012540000… 97.799999999999997
5 United King… 1996-Q1 0.5785831169999… 99
6 United King… 1996-Q2 0.347182834 97.299999999999997

… with 3 more variables: consumer confidence ,

investment growth , unemployment rate

year quarter country success attacktype targettype

1 1995 Q1 Austria 1 Bombing/Exp… Private Citi…
2 1995 Q1 Austria 1 Bombing/Exp… Tourists
3 1995 Q1 Austria 1 Bombing/Exp… Government (…
4 1995 Q1 Austria 1 Bombing/Exp… Tourists
5 1995 Q1 Austria 1 Armed Assau… Private Citi…
6 1995 Q2 Austria 0 Bombing/Exp… Utilities

… with 1 more variable: weapontype

Not really, please click on the link I gave you, read the guide, and try to make a proper reproducible example.

I know it sounds tedious but learning how to properly ask for help is going to largely benefit you in the long run.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.